BETA

Difficulty Level:

Easy

Total Submissions: 151 Accuracy:

22.52%

Base Equivalence
     

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 **

Contributor: jain_rishabh

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

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