#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const long long LINF = 1000000000000000000LL;
const double PI = 3.1415926535897932384626433832795;
long long pmod(long long a, long long p, long long m) {
  long long b = 1;
  while (p) {
    if (p & 1) b = b * a % m;
    a = a * a % m;
    p /= 2;
  }
  return b;
}
bool prime(int p) {
  for (int i = 2; i * i <= p; i++) {
    if (!(p % i)) return false;
  }
  return true;
}
int generator(int p) {
  vector<int> fact;
  int phi = p - 1, n = phi;
  for (int i = 2; i * i <= n; i++) {
    if (!(n % i)) {
      fact.push_back(i);
      while (!(n % i)) n /= i;
    }
  }
  if (n > 1) fact.push_back(n);
  for (int res = 2; res < p; res++) {
    bool ok = true;
    for (int f : fact) {
      if (pmod(res, phi / f, p) == 1) {
        ok = false;
        break;
      }
    }
    if (ok) return res;
  }
  return -1;
}
int pows[131072];
int main() {
  int n;
  scanf("%d", &n);
  if (n == 4) {
    printf("YES\n1\n3\n2\n4\n");
    return 0;
  }
  if (!prime(n)) {
    printf("NO");
    return 0;
  }
  int g = generator(n);
  long long gp = 1;
  for (int i = (0); i < (n); i++) {
    pows[i] = gp;
    gp = gp * g % n;
  }
  printf("YES\n");
  int v = 1;
  printf("1\n");
  for (int i = (0); i < (n - 2); i++) {
    int cur;
    if (!(i & 1))
      cur = v;
    else
      cur = n - v - 2, v += 2;
    printf("%d\n", pows[cur]);
  }
  if (n > 1) printf("%d\n", n);
  return 0;
}
