#include <bits/stdc++.h>
using namespace std;
const int maxprime = 1e6 + 10, up = sqrt(maxprime);
int prime[maxprime];
inline void sieve() {
  for (int i = 0; i < maxprime; i++) prime[i] = i;
  for (int i = 2; i < maxprime; i += 2) prime[i] = 2;
  for (int i = 3; i <= up; i += 2) {
    if (prime[i] != i) continue;
    int lim = i * i;
    int add = 2 * i;
    for (int j = lim; j < maxprime; j += add) {
      if (prime[j] == j) prime[j] = i;
    }
  }
}
const int maxn = 2e6;
long long mod = 1e9 + 7;
long long fact[maxn], inv[maxn], ifact[maxn];
void calcInv() {
  for (int i = 0; i < 2; i++) {
    fact[i] = 1;
    ifact[i] = 1;
    inv[i] = 1;
  }
  for (int i = 2; i < maxn; i++) {
    fact[i] = (i * fact[i - 1]) % mod;
    long long q = mod / i, r = mod % i;
    inv[i] = (-q * inv[r]) % mod;
    inv[i] = (inv[i] + mod) % mod;
    ifact[i] = (inv[i] * ifact[i - 1]) % mod;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cin >> mod;
  sieve();
  if (mod == 1) {
    cout << "YES\n" << 1;
    return 0;
  } else if (mod == 4) {
    cout << "YES\n" << 1 << '\n' << 3 << '\n' << 2 << '\n' << 4;
    return 0;
  }
  if (prime[mod] != mod) {
    cout << "NO";
    return 0;
  }
  calcInv();
  long long preval[mod + 1];
  cout << "YES\n";
  for (int i = 1; i < mod; i++) cout << (i * inv[i - 1]) % mod << '\n';
  cout << mod;
  return 0;
}
