Problem A. Equilateral triangles

Problem

Yesterday Billy gave me a question, which was asked by his professor in Australia. If he can solve that question, the professor will give him $3. Billy is very poor now, and he needs this $3. Here is the question.

Giving a equilateral triangle (i.e., a triangle with all three sides equal), can it be cut into N equilateral triangles (which may have different sizes)?

Input

The input will contain multiple test cases, each on a single line. Each test case contains a single integer N in [1, 2147483647], inclusive. A zero indicates the end of input, which should not be processed.

Output

For each test case, if we can cut an equilateral triangle into N equilateral triangles, print "Yes"; otherwise print "No". Print each output on a single line.

Sample Input

1
2
4
7
0

Sample output

Yes
No
Yes
Yes

Author

Ngai Ka Kit