#abc096d. [abc096_d]Five, Five Everywhere
[abc096_d]Five, Five Everywhere
Problem Statement
Print a sequence whose length is that satisfies the following conditions:
- is a prime number at most .
- The values of are all different.
- In every choice of five different integers from , the sum of those integers is a composite number.
If there are multiple such sequences, printing any of them is accepted.
Notes
An integer not less than is called a prime number if it cannot be divided evenly by any integers except and , and called a composite number otherwise.
Constraints
- is an integer between and (inclusive).
Input
Input is given from Standard Input in the following format:
Output
Print numbers in a line, with spaces in between.
Sample Input 1
5
Sample Output 1
3 5 7 11 31
Let us see if this output actually satisfies the conditions.
First, , , , and are all different, and all of them are prime numbers.
The only way to choose five among them is to choose all of them, whose sum is , which is a composite number.
There are also other possible outputs, such as 2 3 5 7 13
, 11 13 17 19 31
and 7 11 5 31 3
.
Sample Input 2
6
Sample Output 2
2 3 5 7 11 13
- , , , , , are all different prime numbers.
- is a composite number.
- is a composite number.
- is a composite number.
- is a composite number.
- is a composite number.
- is a composite number.
Thus, the sequence 2 3 5 7 11 13
satisfies the conditions.
Sample Input 3
8
Sample Output 3
2 5 7 13 19 37 67 79