A bakery sells two types of bread: whole wheat and sourdough. One day, the bakery sold 30 loaves of bread in total, and the revenue from these sales was $150. If the price of a whole wheat loaf is $4 and the price of a sourdough loaf is $6, how many loaves of each type were sold? Let's think step by step and output the final answer within \boxed{}.
user