At a sale on winter clothing, Cody bought two pairs of gloves and four hats for $44.00. Tori bought two pairs of gloves and two hats for $28.00. Solve the system to determine the prices of the hats and gloves.