#Q202. 「一本通 6.2 练习 3」Goldbach's Conjecture

「一本通 6.2 练习 3」Goldbach's Conjecture

Description

Original source: Ulm Local, problem statement available at: POJ 2262

Goldbach's Conjecture: Every even number greater than 44 can be expressed as the sum of two odd prime numbers. For example:

$$\begin{align} 8&= 3 + 5\\ 20&= 3 + 17 = 7 + 13\\ 42&= 5 + 37 = 11 + 31 = 13 + 29 = 19 + 23 \end{align} $$

Your task is to verify that numbers less than 10610^6 satisfy Goldbach's Conjecture.

Input Format

Multiple test cases, each containing an integer nn.

Input ends with 00.

Output Format

For each test case, output in the format n=a+bn = a + b, where a,ba,b are odd primes. If there are multiple valid pairs of a,ba,b, output the pair with the largest bab-a difference.
If no solution exists, output Goldbach's conjecture is wrong..

Sample 1

8
20
42
0

8 = 3 + 5
20 = 3 + 17
42 = 5 + 37

Data Range and Hint

For all data, 6n1066\le n\le 10^6.