P1579 Goldbach's Conjecture (Upgraded Version)

Background

On June 7, 1742, Goldbach wrote to the great mathematician Euler, formally proposing the following conjecture: any odd number greater than $9$ can be expressed as the sum of $3$ primes. A prime is a number that has no divisors other than $1$ and itself; for example, $2$ and $11$ are primes, while $6$ is not, because besides $1$ and $6$, it also has divisors $2$ and $3$. **Note in particular that 1 is not a prime.** This is Goldbach's conjecture. In his reply, Euler said he believed the conjecture was correct, but he could not prove it. Since then, this mathematical challenge has attracted the attention of almost all mathematicians. Goldbach's conjecture has thus become an unattainable “jewel” in the crown of mathematics.

Description

Now please write a program to verify Goldbach's conjecture. Given an odd number $n$, output $3$ primes whose sum equals the input odd number.

Input Format

Only one line, containing a positive odd integer $n$, where $9 < n < 20000$.

Output Format

Only one line, output $3$ primes whose sum equals the input odd number. Adjacent primes are separated by a single space, and there is no space after the last prime. If the representation is not unique, output the scheme with the smallest first prime. If there are multiple such schemes, output the one that also has the smallest second prime.

Explanation/Hint

Translated by ChatGPT 5