A grocery store orders 47 bags of onins and 162 bags of potatoes. The onions cost 2 per bag , and potatoes cost 3 per bag How much is spent on onions and potatoes