P, Q and E start a joint venture, where in they make an annual profit. P invested one-third of the capital for one-fourth of the time, Q invested one-fourth of the capital for one-half of the time and R invested the remainder of the capital for the entire year. P is a working partner and gets a salary of `10,000 per month. The profit after paying P’s salary is directly proportional to the sum each one has put and also to the square of the number of months for which each has put their sum in the venture. If in a year P earns ` 60,000 more than Q, then how much does P earn?