#include <bits/stdc++.h>
using namespace std;
long long n;
long long A[100100];
bool F[100100];
bool f[100100];
void sieve() {
  memset(F, 1, sizeof(F));
  for (long long i = 2; i * i <= 100000; i++)
    if (F[i])
      for (long long j = i * i; j <= 100000; j += i) F[j] = 0;
}
long long extended_euclid(long long a, long long b, long long &x,
                          long long &y) {
  long long xx = y = 0;
  long long yy = x = 1;
  while (b) {
    long long q = a / b;
    long long t = b;
    b = a % b;
    a = t;
    t = xx;
    xx = x - q * xx;
    x = t;
    t = yy;
    yy = y - q * yy;
    y = t;
  }
  return a;
}
long long mod(long long a, long long b) { return ((a % b) + b) % b; }
vector<long long> modular(long long a, long long b, long long n) {
  long long x, y;
  vector<long long> solutions;
  long long d = extended_euclid(a, n, x, y);
  if (!(b % d)) {
    x = mod(x * (b / d), n);
    for (long long i = 0; i < d; i++)
      solutions.push_back(mod(x + i * (n / d), n));
  }
  return solutions;
}
int main() {
  sieve();
  scanf("%I64d", &n);
  if (n == 4) {
    printf("YES\n");
    printf("1\n3\n2\n4\n");
    return 0;
  }
  if (F[n]) {
    A[1] = 1;
    memset(f, 0, sizeof(f));
    bool aa = 1;
    f[1] = 1;
    for (long long i = 2; i <= n; i++) {
      vector<long long> ans;
      ans = modular(i - 1, i % n, n);
      if (ans.size() != 0) A[i] = ans[0];
      if (A[i] == 0) A[i] = n;
      if (f[A[i]]) {
        aa = 0;
      }
      F[A[i]] = 1;
    }
    if (aa == 0) {
      printf("NO\n");
      return 0;
    }
    printf("YES\n");
    for (long long i = 1; i <= n; i++) printf("%I64d\n", A[i]);
  } else {
    printf("NO\n");
  }
  return 0;
}
