Given a positive integer, write a function to find if it is a power of three or not.
First line consists of T test cases. Only line of every test case consists of a 32-bit integer N.
Single line output, print "Yes" if integer is a power of 3 else "No"
1<=N<=(32-bit largest integer)
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.