#include <bits/stdc++.h>
using namespace std;
int N;
bool is_prime(int x) {
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) return 0;
  }
  return x > 1;
}
int modpow(int x, int p, int m) {
  if (p == 0) return 1;
  long long s = modpow(x, p / 2, m);
  return s * s % m * (p & 1 ? x : 1) % m;
}
int main() {
  cin >> N;
  if (N == 1) {
    cout << "YES\n1\n";
  } else if (N == 4) {
    cout << "YES\n1\n3\n2\n4\n";
  } else if (is_prime(N)) {
    int k = N - 1, r;
    vector<int> v;
    for (int i = 2; i <= k; i++) {
      if (k % i != 0) continue;
      v.push_back(i);
      while (k % i == 0) k /= i;
    }
    for (r = 2; r < N; r++) {
      bool ok = 1;
      for (int j = 0; j < v.size(); j++) {
        ok &= (modpow(r, (N - 1) / v[j], N) != 1);
      }
      if (ok) break;
    }
    cout << "YES\n";
    for (int i = 1; i < N; i++) {
      cout << modpow(r, i % 2 ? i - 1 : N - i, N) << '\n';
    }
    cout << N << '\n';
  } else
    cout << "NO\n";
}
