4678 - Hdu5403 Goldbach

Let d(x) be the sum of all divisors of x. x is called a good number if every number from 1 to d(x) can be expressed as a sum of distinct divisors of x. For example, 6 is a good number, d(6)=1+2+3+6=12, 4=1+3,5=2+3,7=1+6 and so on. Teacher Mai wants to know whether a even number p can be expressed as a sum of two good numbers.

输入

There are multiple test cases(about 40000). For each test case, there is only one line contains one even number p(1≤p≤10^18). Most test cases are generated randomly.

输出

For each test case, print "YES" or "NO" in the first line. That means if is possible to express p as a sum of two good numbers. If your answer is "YES", print two number a,b in the second lines. Both a and b should be good numbers, and a+b=p. In the third and the fourth line, print the factorization of number a and b. If a=sigma(pi^ei),(1<=i<=k) where p1<p2<?<pk, pi are all prime numbers and ei≥1, you should print k first, then 2k space-seperated numbers p1,e1,p2,e2,?,pk,ek.

样例

输入

18

输出

YES
6 12
2 2 1 3 1
2 2 2 3 1

提示

0 is not a good number.

Hint 请不要提交,尚无Spj

时间限制 1 秒
内存限制 128 MB
统计
上一题 下一题