Easy Math > Basic Math
So the winter is finally here. Last night I was scrolling Pacebook and I notice a very serious event named **Ei Shit e Bou Chai**. To show my solidarity I pressed the **Going** option. My father somehow noticed and commented on my response to that event. The response was like that, "If you are able to solve the following problem I will let you marry." > You need to tell me whether it is possible to have exactly K numbers between 1 > to N such that A<sup>2</sup> + A<sup>3</sup> will be a square number where 1<= A <= N. I tried whole night to figure out any clue about the problem but failed. That’s why I am now here to have your help. Could you help me finding it? Input: ------ Input starts with an integer **T** which is the test case. For each of the T lines, you will have two integers **N** and **K**. Constraints: --------------- 1<= **T** <= 10000<br> 1<= **N, K** <= 10^5 Output: ------- For each test case, you have to print **"I am married now"** without any quote if there are a total of **K** such **A** less than or equal to **N** such that each A’s summation of square and cube (i.e. **A<sup>2</sup> + A<sup>3</sup> where A<=N**) will be a square number. Otherwise, print **"Baba amar ki biye hobe na"** without any quote. Sample Input ------------ 2 3 1 3 2 Sample Output ------------- I am married now Baba amar ki biye hobe na Explanation ---------------- In the first test case, - Let, A = 1. So, A<sup>2</sup> + A<sup>3</sup> = 2 . 2 is not a square number. - Let, A = 2. So, A<sup>2</sup> + A<sup>3</sup> = 4 + 8 = 12. 12 is not a square number. - Let, A = 3. So, A<sup>2</sup> + A<sup>3</sup> = 9 + 27 = 36. 36 is a square number. Hence we have 1 square number for A = 3 which is equal to K = 1. But in the 2nd test case, we have K = 2.So it’s not possible to have K = 2.