Highly Composite Permutations

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

Positive integer xx 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=p_1,p_2,,p_np = \langle p\_1, p\_2, \ldots, p\_n \rangle is called a permutation of length nn if it contains every integer between 1 and nn, inclusive, exactly once.

We'll call permutation p=p_1,p_2,,p_np = \langle p\_1, p\_2, \ldots, p\_n \rangle highly composite if for every ii between 1 and nn, inclusive, the sum of the first ii elements of pp (that is, p_1+p_2++p_ip\_1 + p\_2 + \ldots + p\_i) is composite.

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

입력

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

출력

If no highly composite permutation of length nn exists, output a single integer 1-1. Otherwise, output nn integers p_1,p_2,,p_np\_1, p\_2, \ldots, p\_n such that p=p_1,p_2,,p_np = \langle p\_1, p\_2, \ldots, p\_n \rangle is a highly composite permutation.

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

힌트

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=229 + 13 = 22, is composite, the sum of the first three elements of the permutation, 9+13+6=289 + 13 + 6 = 28, is composite, and so on.

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