Given a number N and base b if N in base b representation starts with 1 print Yes else print No
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow Each test case contaisn two integers N and b denoting the integer and base respectively.
Print "Yes"(without quotes) if N in base b representation starts with 1 else print "No" ( without quotes).
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.