Given the task definition and input, reply with output. The task is to generate the correct answer for a given math problem.

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 ?
11