Ralph went to the store and bought 12 pairs of socks for a total of \24.Someofthesocksheboughtcost$1apair,someofthesocksheboughtcost$3apair,andsomeofthesocksheboughtcost$4apair.Ifheboughtatleastonepairofeachtype,howmanypairsof$1socksdidRalphbuy?</br>(A) 4 \qquad
(B) 5 \qquad
(C) 6 \qquad
(D) 7 \qquad
(E) 8
$