시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB52353371.739%

문제

Positive integer $x$ is called composite if it has strictly more than two positive integer divisors. For example, integers 4, 30 and 111 are composite, while 1, 7 and 239 are not.

Integer sequence $p = \langle p_1, p_2, \ldots, p_n \rangle$ is called a permutation of length $n$ if it contains every integer between 1 and $n$, inclusive, exactly once.

We'll call permutation $p = \langle p_1, p_2, \ldots, p_n \rangle$ highly composite if for every $i$ between 1 and $n$, inclusive, the sum of the first $i$ elements of $p$ (that is, $p_1 + p_2 + \ldots + p_i$) is composite.

Given a single integer $n$, find a highly composite permutation of length $n$.

입력

The only line of the input contains a single integer $n$ ($1 \le n \le 100$).

출력

If no highly composite permutation of length $n$ exists, output a single integer $-1$. Otherwise, output $n$ integers $p_1, p_2, \ldots, p_n$ such that $p = \langle p_1, p_2, \ldots, p_n \rangle$ is a highly composite permutation.

If there are multiple highly composite permutations of length $n$, you may output any of them.

예제 입력 1

13

예제 출력 1

9 13 6 5 3 2 8 4 1 12 11 10 7

예제 입력 2

2

예제 출력 2

-1

힌트

In the first example test case, the first element of the permutation, 9, is composite, the sum of the first two elements of the permutation, $9 + 13 = 22$, is composite, the sum of the first three elements of the permutation, $9 + 13 + 6 = 28$, is composite, and so on.

In the second example test case, only two permutations of the required length exist, $\langle 1, 2 \rangle$ and $\langle 2, 1 \rangle$, and neither of them is highly composite.