#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 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 satisfy Goldbach's Conjecture.
Input Format
Multiple test cases, each containing an integer .
Input ends with .
Output Format
For each test case, output in the format , where are odd primes. If there are multiple valid pairs of , output the pair with the largest 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, .