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=\prod_{i=1}^k p_i^{e_i}$, where $p_1<p_2<\cdots<p_k$, $p_i$ are all prime numbers and $e_i\geq 1$, you should print $k$ first, then $2k$ space-seperated numbers $p_1,e_1,p_2,e_2,\cdots,p_k,e_k$.