CF1388A.Captain Flint and Crew Recruitment

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

Captain Flint and Crew Recruitment

Despite his bad reputation, Captain Flint is a friendly person (at least, friendly to animals). Now Captain Flint is searching worthy sailors to join his new crew (solely for peaceful purposes). A sailor is considered as worthy if he can solve Flint's task.

Recently, out of blue Captain Flint has been interested in math and even defined a new class of integers. Let's define a positive integer xx as nearly prime if it can be represented as pqp \cdot q, where 1<p<q1 \lt p \lt q and pp and qq are prime numbers. For example, integers 66 and 1010 are nearly primes (since 23=62 \cdot 3 = 6 and 25=102 \cdot 5 = 10), but integers 11, 33, 44, 1616, 1717 or 4444 are not.

Captain Flint guessed an integer nn and asked you: can you represent it as the sum of 44 different positive integers where at least 33 of them should be nearly prime.

Uncle Bogdan easily solved the task and joined the crew. Can you do the same?

Input

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

Next tt lines contain test cases — one per line. The first and only line of each test case contains the single integer nn (1n2105)(1 \le n \le 2 \cdot 10^5) — the number Flint guessed.

Output

For each test case print:

  • YES and 44 different positive integers such that at least 33 of them are nearly prime and their sum is equal to nn (if there are multiple answers print any of them);
  • NO if there is no way to represent nn as the sum of 44 different positive integers where at least 33 of them are nearly prime.

You can print each character of YES or NO in any case.

Note

In the first and second test cases, it can be proven that there are no four different positive integers such that at least three of them are nearly prime.

In the third test case, n=31=27+25+23+1n=31=2 \cdot 7 + 2 \cdot 5 + 2 \cdot 3 + 1: integers 1414, 1010, 66 are nearly prime.

In the fourth test case, n=36=5+23+25+35n=36=5 + 2 \cdot 3 + 2 \cdot 5 + 3 \cdot 5: integers 66, 1010, 1515 are nearly prime.

In the fifth test case, n=44=23+7+25+37n=44=2 \cdot 3 + 7 + 2 \cdot 5 + 3 \cdot 7: integers 66, 1010, 2121 are nearly prime.

In the sixth test case, n=100=2+25+311+511n=100=2 + 2 \cdot 5 + 3 \cdot 11 + 5 \cdot 11: integers 1010, 3333, 5555 are nearly prime.

In the seventh test case, $n=258=2 \cdot 5 + 3 \cdot 7 + 13 \cdot 17 + 2 \cdot 3$: integers 1010, 2121, 221221, 66 are nearly prime.

Samples

7
7
23
31
36
44
100
258
NO
NO
YES
14 10 6 1
YES
5 6 10 15
YES
6 7 10 21
YES
2 10 33 55
YES
10 21 221 6

在线编程 IDE

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