HUST 2016招新选拔

From: 2016-03-06 14:00:00 To: 2016-03-06 17:30:00 Now: 2017-09-24 21:46:34 Status: Public

G - Goldbach

Time Limit: 1s Memory Limit: 512MB

Submissions: 88 Solved: 29
Description

It is still unproven that whether an even integer n can be the sum of tow odd prime numbers.

Example:

14 = 3 + 11.

22 = 3 + 19 = 5 + 17 = 11 + 11.

Input

The input will contain one or more test cases.

Each test case consists of one even integer n (6 <= n <= 1000000).

Input will be terminated by a value of 0 for n.

Output

For each test case, you should print one line:

n = a + b, where a and b are odd primes.

If there is more than one pair of a and b adding up to n,

output the pair where b - a is maxmized. If there is no such pair, print a 

line saying "No answer".

Sample Input
14
22
0
Sample Output
14 = 3 + 11
22 = 3 + 19
Hint
Source