Base Equivalence
Submissions: 216   Accuracy:

30.55%

  Difficulty: Easy   Marks: 2

Given a number (n) and no. of digits (m) to represent the number, find if given number can be represented in given no. of digits in any base from 2 to 32.

Input:

First line of input contains the number of test cases.

Each line of test case contains 2 integers n and m.


Output:
Print "Yes" if its possible to represent the number else "No" without quotes.  

Constraints:

1<=T<=100

1<= n<= 10^9

1<=m<=32
Example:

Sample Input:

2
8 2
8 3

Sample Output:

Yes
No

** For More Input/Output Examples Use 'Expected Output' option **

Author: jain_rishabh


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.