The sum of the diameters of the largest and smallest pizzas sold at a pizza shop is 31 inches. the difference in their diameters is 9 inches. find the diameters of the largest and smallest pizzas.