A group of friends collected $75 to buy a gift. They decided to split the cost equally among themselves. If each friend contributed $15, how many friends were in the group? After buying the gift, they found they had $12 left. How much did the gift cost? Let's think step by step and output the final answer within \boxed{}.
user