K. Profact
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Alice is bored out of her mind by her math classes. She craves for something much more exciting. That is why she invented a new type of numbers, the profacts. Alice calls a positive integer number a profact if it can be expressed as a product of one or several factorials.
Just today Alice received n bills. She wonders whether the costs on the bills are profact numbers. But the numbers are too large, help Alice check this!
Input
The first line contains a single integer n, the number of bills (1 ≤ n ≤ 105). Each of the next n lines contains a single integer ai, the cost on the i-th bill (1 ≤ ai ≤ 1018).
Output
Output n lines, on the i-th line output the answer for the number ai. If the number ai is a profact, output "YES", otherwise output "NO".
Examples
input
7
1
2
3
8
12
24
25
output
YES
YES
NO
YES
YES
YES
NO
Note
A factorial is any number that can be expressed as 1·2·3·...·k, for some positive integer k, and is denoted by k!.
http://codeforces.com/gym/100796/problem/K
题目大意:
一个数字,如果可以组成若干个阶乘的和,那么就输出yes,反之输出no