Cheese pizzas cost $7 and pepperoni pizzas cost $9. You order a total of 40 pizzas and the bill is $310. How many of each pizza did you order