A company manufactures x units of Product A and y units of Product B, on two machines, I and II. It has been determined that the company will realize a profit of $2 on each unit of Product A and $3 on each unit of Product B. To manufacture a unit of Product A requires 7 min on Machine I and 3 min on Machine II. To manufacture a unit of Product B requires 10 min on Machine I and 5 min on Machine II. There are 360 min available on Machine I and 170 min available on Machine II in each work shift. How many units of a product should be produced in each shift to maximize the company's profit P in dollars?