Universal Cup Judging System

Universal Cup

Límite de tiempo: 2 s Límite de memoria: 1024 MB Puntuación total: 100 Hackeable ✓
Estadísticas

KSA students got tired of studying linear algebra and came up with the following problem.

Given an integer $N$, determine if there exists a sequence satisfying the following conditions, and if so, find one.

  • The sequence is a permutation of length $N$. In other words, each sequence element is in the range of 1, 2, $\dots$, $N$, and the elements are pairwise distinct.
  • Let $S$ be any contiguous subsequence of the sequence whose length is 2 or greater, then the value of $\max(S)-\min(S)$ is always not a prime number.

A sequence $A$ is a contiguous subsequence of a sequence $B$ if $A$ can be obtained from $B$ by the deletion of several (possibly zero) elements from the beginning and several (possibly zero) elements from the end.

KSA students asked you to solve this problem since they forgot what a prime number is.

Input

The first line contains an integer $N$.

Output

On the first line, print YES if there exists a sequence satisfying the conditions, and NO otherwise.

If such a sequence $A$ exists, print $N$ space-separated integers $A_1, A_2, \dots, A_N$ on the second line.

If there are multiple answers, print any of them.

Constraints

  • $2 \le N \le 1000$

Scoring

No. Points Constraints
1 17 $N=17$
2 40 $N$ is even
3 43 No additional constraints

Examples

Input 1

5

Output 1

NO

Input 2

10

Output 2

YES
5 4 8 2 10 1 9 3 7 6

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.