시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB121241816.071%

문제

In the year of 1742 C. Goldbach wrote in his letter to L. Euler that according to him each integer n > 5 was the sum of three prime numbers (a prime number is an integer n > 1, which has only two positive, integer divisors: 1 and n.). Euler answered, that Golbach's statement was equal to the one, that each even number n ≥ 4 was the sum of two prime numbers. However, it did not make them any closer to the solution of the basic problem: is it really so? At the present we know that this statement is true for numbers up to 1011 (and we know much more, but this hypothesis is still an open problem). We are not about to verify that, but we will try to solve a less ambitious problem. Each integer n ≥ 10 is the sum of different odd prime numbers.

Write a program which:

  • reads integers from the standard input,
  • finds their decompositions into the sums of different odd prime numbers,
  • writes the results to the standard output.

There could be many of such decompositions. Your program can find any of them.

입력

In the first line of the standard input there is one positive integer n, n ≤ 40. In each of the following n lines there is one integer from the interval [10…2,000,000,000].

 

출력

Decomposition of the number k has to be written in two lines. In the first line one integer m ≥ 1 should be written, this is the number of addends of the decomposition. In the second line m different odd numbers should be written in ascending order. Their sum should be equal to k, and they should be separated by single spaces. The decompositions should appear in the same order as the integers in the input file.

 

예제 입력 1

2
59
15

예제 출력 1

5
5 7 11 17 19
3
3 5 7

출처

Olympiad > Polish Olympiad in Informatics > POI 2000/2001 > Stage 2 1번

  • 스페셜 저지를 만든 사람: koosaga