BETA

Difficulty Level:

Easy

Total Submissions: 632 Accuracy:

16.14%

Check if a Integer is power of 8 or not
     

Given a positive integer N, The task is to find if it is a power of eight or not.

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains an integer N.

Output:
In new line print "Yes" if it is a power of 8, else print "No".

Constraints:
1<=T<=100
1<=N<=1018

Example:
Input:

2
64
75
Output:
Yes
No

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

Contributor: Arun Tyagi

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.