luogu#P1579. 哥德巴赫猜想(升级版)

哥德巴赫猜想(升级版)

Background

On June 7, 1742, Goldbach wrote to the great mathematician Euler, formally proposing the following conjecture: any odd number greater than 99 can be expressed as the sum of 33 primes. A prime is a number that has no divisors other than 11 and itself; for example, 22 and 1111 are primes, while 66 is not, because besides 11 and 66, it also has divisors 22 and 33. 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.

Problem Description

Now please write a program to verify Goldbach's conjecture.

Given an odd number nn, output 33 primes whose sum equals the input odd number.

Input Format

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

Output Format

Only one line, output 33 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.

2009
3 3 2003

Hint

Translated by ChatGPT 5