#include <bits/stdc++.h>
using namespace std;
int power(int A, int B, int mod) {
  int C = 1;
  while (B) {
    if (B & 1) C = C * (long long)A % mod;
    A = A * (long long)A % mod;
    B >>= 1;
  }
  return C;
}
const int MAXN = 1e5 + 7;
int p[MAXN], cntp;
int isp[MAXN];
void getp() {
  for (int i = 2; i < MAXN; i++) {
    if (!isp[i]) p[++cntp] = i;
    for (int j = 1; i * p[j] < MAXN && j <= cntp; j++) {
      isp[i * p[j]] = 1;
      if (i % p[j] == 0) break;
    }
  }
}
int T, n, opt;
int Map[MAXN];
int ans[MAXN];
int t[MAXN], it[MAXN], inv[MAXN];
void read(int& A) {
  A = 0;
  char ch = '!';
  while (ch < '0' || ch > '9') ch = getchar();
  while (ch >= '0' && ch <= '9') {
    A = A * 10 + ch - '0';
    ch = getchar();
  }
}
void write(int A) {
  if (A / 10) write(A / 10);
  putchar(A % 10 + '0');
}
int main() {
  getp();
  T = 1;
  while (T--) {
    read(n);
    opt = 2;
    if (opt == 2) {
      if (n == 1) {
        putchar('Y');
        putchar('E');
        putchar('S');
        putchar('\n');
        putchar('1');
        putchar('\n');
        continue;
      }
      if (n == 4) {
        putchar('Y');
        putchar('E');
        putchar('S');
        putchar('\n');
        putchar('1');
        putchar('\n');
        putchar('3');
        putchar('\n');
        putchar('2');
        putchar('\n');
        putchar('4');
        putchar('\n');
        continue;
      }
      if (isp[n]) {
        putchar('N');
        putchar('O');
        putchar('\n');
        continue;
      }
      ans[n] = n;
      t[0] = 1;
      for (int i = 1; i < n; i++) t[i] = t[i - 1] * (long long)i % n;
      it[n - 1] = power(t[n - 1], n - 2, n);
      for (int i = n - 2; i >= 0; i--)
        it[i] = it[i + 1] * (long long)(i + 1) % n;
      for (int i = 1; i < n; i++) inv[i] = it[i] * (long long)t[i - 1] % n;
      for (int i = n - 1; i >= 2; i--) ans[i] = inv[i] * (long long)(i - 1) % n;
      ans[1] = 1;
      putchar('Y');
      putchar('E');
      putchar('S');
      putchar('\n');
      for (int i = 1; i <= n; i++) {
        write(ans[i]);
        putchar('\n');
      }
      putchar('\n');
    } else {
      if (n == 1) {
        putchar('Y');
        putchar('E');
        putchar('S');
        putchar('\n');
        putchar('1');
        putchar('\n');
        continue;
      }
      if (n % 2 == 1) {
        putchar('N');
        putchar('O');
        putchar('\n');
        continue;
      }
      for (int i = 1; i <= n; i += 2) ans[i + 1] = i;
      for (int i = 2; i <= n; i += 2) ans[i + 1] = n - i;
      ans[1] = n;
      putchar('Y');
      putchar('E');
      putchar('S');
      putchar('\n');
      for (int i = 1; i <= n; i++) {
        write(ans[i]);
        putchar(' ');
      }
      putchar('\n');
    }
  }
  return 0;
}
