#include <bits/stdc++.h>
using namespace std;
int TestMillerRabin[5] = {2, 3, 5, 7, 11};
long long mulmod(long long a, long long b, long long p) {
  long long x = 0, y = a % p;
  while (b > 0) {
    if (b % 2 == 1) x = (x + y) % p;
    y = (1LL * y * 2) % p;
    b = b / 2;
  }
  return x % p;
}
long long fastexp(long long x, long long y, long long p) {
  long long ans = 1;
  while (y > 0) {
    if (y & 1) ans = (1LL * ans * x) % p;
    y = y >> 1;
    x = (1LL * x * x) % p;
  }
  return ans % p;
}
long long fastexpp(long long x, long long y, long long p) {
  long long ans = 1;
  while (y > 0) {
    if (y & 1) ans = mulmod(ans, x, p);
    y = y >> 1;
    x = mulmod(x, x, p);
  }
  return ans % p;
}
long long invmod(long long x, long long p) { return fastexp(x, p - 2, p) % p; }
bool check_composite(long long n, long long a, long long d, int s) {
  long long x = fastexp(a, d, n);
  if (x == 1 || x == n - 1) return false;
  for (int r = 1; r < s; r++) {
    x = (1LL * x * x) % n;
    if (x == n - 1) return false;
  }
  return true;
}
bool isPrime(long long p) {
  if (p <= 1) return false;
  int r = 0;
  long long d = p - 1;
  while ((d & 1) == 0) {
    d >>= 1;
    r++;
  }
  for (int i = 0; i < 5; i++) {
    int value = TestMillerRabin[i];
    if (p == value) return true;
    if (check_composite(p, value, d, r)) return false;
  }
  return true;
}
vector<long long> prefhash(string p) {
  int pi = 31;
  vector<long long> pref;
  for (int i = 0; i < p.size(); i++) {
    if (i > 0) {
      long long aux = pref[i - 1];
      pref.push_back(
          (aux + ((p[i] - 'a' + 1) * fastexp(pi, i, 1000000009)) % 1000000009) %
          1000000009);
    } else
      pref.push_back(p[i] - 'a' + 1);
  }
  return pref;
}
long long hashsubs(string p, int i, int j, vector<long long> pp) {
  int pi = 31;
  int sz = j - i + 1;
  long long fp = (pp[i + sz - 1] - pp[i - 1] + 1000000009) % 1000000009;
  long long sp = invmod(fastexp(pi, i, 1000000009), 1000000009);
  return (1LL * fp * sp) % 1000000009;
}
int main() {
  int n;
  cin >> n;
  if (n <= 2) {
    cout << "YES\n";
    for (int i = 1; i <= n; i++) cout << i << '\n';
    return 0;
  }
  if (n == 4) {
    cout << "YES\n";
    cout << "1\n3\n2\n4";
    return 0;
  }
  if (isPrime(n)) {
    cout << "YES\n";
    cout << "1\n2\n";
    int cp = 2;
    for (int i = 2; i < n - 1; i++) {
      int gg = invmod(cp, n);
      int m = (1LL * (cp + 1) * gg) % n;
      cp = (1LL * cp * m) % n;
      cout << m << '\n';
    }
    cout << n << '\n';
  } else
    cout << "NO";
  return 0;
}
