At a sale on winter clothing, Cody bought four pairs of gloves and four hats for $36.00. Tori bought three pairs of gloves and four hats for $31.00. What were the prices for the gloves and hats?​