CF487C Prefix Product Sequence

Description

Consider a sequence $ a_{1},a_{2},... ,a_{n}$ . Define its prefix product sequence ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF487C/ff8116fff58c431c0df2f0dc70c6d2a466564b92.png). Now given $ n $ , find a permutation of $1,2,...,n$ , such that its prefix product sequence is a permutation of $0,1,...,n-1$ .

Input Format

The only input line contains an integer $ n $ ( $ 1 \leq n \leq 10^{5} $ ).

Output Format

In the first output line, print "YES" if such sequence exists, or print "NO" if no such sequence exists. If any solution exists, you should output n more lines. i-th line contains only an integer ai. The elements of the sequence should be different positive integers no larger than n. If there are multiple solutions, you are allowed to print any of them.

Explanation/Hint

For the second sample, there are no valid sequences.