A, B and C investment in a partnership in the ratio of 5 : 6 : 8. The ratio of their profit is 5 : 3 : 12. Find the ratio of time for their investment ?