Definition: The task is to generate the correct answer for a given math problem.
Input: Problem: the ratio of investments of two partners p and q is 7 : 5 and the ratio of their profits is 7 : 11 . if p invested the money for 5 months , find for how much time did q invest the money ?
