#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int T, n, op, a[N], inv[N];
inline int read() {
  int sum = 0, fg = 1;
  char c;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') fg = -1;
  for (; c >= '0' && c <= '9'; c = getchar())
    sum = (sum << 3) + (sum << 1) + c - '0';
  return sum * fg;
}
int main() {
  {
    n = read();
    op = 2;
    if (op == 1) {
      if (n & 1) {
        puts("NO");
        return 0;
      }
      puts("YES");
      for (int i = 1; i <= n; i += 2) printf("%d %d ", n - i + 1, i);
      puts("");
    } else {
      if (n == 4) {
        printf("YES\n1 3 2 4\n");
        return 0;
      }
      bool fg = 1;
      for (int i = 2; i * i <= n && fg; ++i)
        if (n % i == 0) fg = 0;
      if (!fg) {
        puts("NO");
        return 0;
      }
      puts("YES");
      inv[0] = inv[1] = 1;
      for (int i = 2; i < n; ++i) inv[i] = 1ll * (n - n / i) * inv[n % i] % n;
      for (int i = 1; i < n; ++i) printf("%d ", 1ll * i * inv[i - 1] % n);
      printf("%d\n", n);
    }
  }
  return 0;
}
