The task is to generate the correct answer for a given math problem.

Input: Consider Input: Problem: a and b invests rs . 10000 each , a investing for 6 months and b investing for all the 12 months in the year . if the total profit at the end of the year is rs . 24000 , find their shares ?

Output: 8000


Input: Consider Input: Problem: in a group of 150 readers who read science fiction or literacy works or both , 120 read science fiction and 90 read literacy works . how many read both science fiction and literacy works ?

Output: 60


Input: Consider Input: Problem: there are two positive numbers in the ratio 2 : 7 . if the larger number exceeds the smaller by 30 , then find the larger number ?


Output: 42