John Galt Shipping wishes to ship a product that is made at two different factories to three different warehouses. They produce 18 units at Factory A and 22 units at Factory B. They need 14 units in warehouse #1, 24 units in warehouse #2, and 14 units in warehouse #3. Per unit transportation costs are shown in the table below. How many units should be shipped from each factory to each warehouse?