Three partners shared the profit in a business in the ratio 5 : 7 : 8 . They had partnered for 14 months, 8 months and 7 moths respectively . What was the ratio of their investments ?