Ram and Shyam love numbers, Ramu likes the odds and Shamu adores the even ones. One day, they decided to play a game 'CodeMath' to collect as many numbers as possible. They both play one after other , writing a number greater than the previous one. Like a normal Bitsian, both of them are pretty lazy , so they fix up a maximum number MAX_NUM beyond which they aren't allowed to enter a number and also , they can end the game whenever they want with mutual acceptance. Ramu Starts the game.
CodeMath(MAX_NUM) gives no of possible ways to play the game.
Eg: CodeMath(3)?
MAX_NUM = 3 (given)
No. of possibilities
I. 1
II. 1 2
III. 3
IV. 1 2 3
V. and the empty set !
Answer: CodeMath(3) = 5 , no of possible ways
You, their friend Ghanshyam , who is capable of doing only integer manipulations , has to find a number x that minimizes the function CodeMath(162)/x + CodeMath(285)/x where 162 and 285 denote the respective MAX_NUM.
Since the answer can go beyond storable values, print x % 10^9+7.