#include <bits/stdc++.h>
const int Mod = (int)1e9 + 7;
const int MX = 1073741822;
const long long MXLL = 4611686018427387903;
const int Sz = 1110111;
using namespace std;
inline void Read_rap() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
}
int n;
long long binpow(long long a, int b, int p) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % p;
    a = (a * a) % p;
    b >>= 1;
  }
  return res;
}
inline bool prime(int n) {
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) return 0;
  return 1;
}
int main() {
  Read_rap();
  cin >> n;
  if (n == 1) {
    cout << "YES\n1";
    return 0;
  }
  if (n == 4) {
    cout << "YES\n1\n3\n2\n4";
    return 0;
  }
  if (prime(n)) {
    cout << "YES" << endl << 1 << endl;
    for (int i = 2; i < n; i++)
      cout << (i * binpow(i - 1, n - 2, n)) % n << endl;
    cout << n << endl;
  } else
    cout << "NO";
  return 0;
}

### Prompt

Please create a solution in CPP to the following problem:

Consider a sequence [a1, a2, ... , an]. Define its prefix product sequence <image>.

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

The only input line contains an integer n (1 ≤ n ≤ 105).

Output

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.

Examples

Input

7


Output

YES
1
4
3
6
5
2
7


Input

6


Output

NO

Note

For the second sample, there are no valid sequences.

### Response

```cpp
#include <bits/stdc++.h>
const int Mod = (int)1e9 + 7;
const int MX = 1073741822;
const long long MXLL = 4611686018427387903;
const int Sz = 1110111;
using namespace std;
inline void Read_rap() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
}
int n;
long long binpow(long long a, int b, int p) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % p;
    a = (a * a) % p;
    b >>= 1;
  }
  return res;
}
inline bool prime(int n) {
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) return 0;
  return 1;
}
int main() {
  Read_rap();
  cin >> n;
  if (n == 1) {
    cout << "YES\n1";
    return 0;
  }
  if (n == 4) {
    cout << "YES\n1\n3\n2\n4";
    return 0;
  }
  if (prime(n)) {
    cout << "YES" << endl << 1 << endl;
    for (int i = 2; i < n; i++)
      cout << (i * binpow(i - 1, n - 2, n)) % n << endl;
    cout << n << endl;
  } else
    cout << "NO";
  return 0;
}

```