CF2093A.Ideal Generator

传统题 时间 2000 ms 内存 256 MiB 3 尝试 1 已通过 1 标签

Ideal Generator

We call an array aa, consisting of kk positive integers, palindromic if $[a_1, a_2, \dots, a_k] = [a_k, a_{k-1}, \dots, a_1]$. For example, the arrays [1,2,1][1, 2, 1] and [5,1,1,5][5, 1, 1, 5] are palindromic, while the arrays [1,2,3][1, 2, 3] and [21,12][21, 12] are not.

We call a number kk an ideal generator if any integer nn (nkn \ge k) can be represented as the sum of the elements of a palindromic array of length exactly kk. Each element of the array must be greater than 00.

For example, the number 11 is an ideal generator because any natural number nn can be generated using the array [n][n]. However, the number 22 is not an ideal generator — there is no palindromic array of length 22 that sums to 33.

Determine whether the given number kk is an ideal generator.

Input

The first line of the input contains one integer tt (1t10001 \le t \le 1000) — the number of test cases.

The first and only line of each test case contains one integer kk (1k10001 \le k \le 1000).

Output

For each number kk, you need to output the word "YES" if it is an ideal generator, or "NO" otherwise.

You may output "Yes" and "No" in any case (for example, the strings "yES", "yes", and "Yes" will be recognized as a positive answer).

Samples

5
1
2
3
73
1000
YES
NO
YES
YES
NO

在线编程 IDE

建议全屏模式获得最佳体验