A pizzeria sells two types of pizza for lunch: pepperoni and cheese. The pepperoni pizza costs $8.50 and the cheese pizza costs $6.00. In one day they sold 45 pizzas for a total of $365. How many cheese pizzas were sold? How many pepperoni pizzas were sold?