#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
void ioi(string name) {
  freopen((name + ".in").c_str(), "r", stdin);
  freopen((name + ".out").c_str(), "w", stdout);
}
long long n;
vector<long long> v;
bitset<100005> w;
long long gcd(long long a, long long b, long long &x, long long &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  long long x1, y1;
  long long d = gcd(b, a % b, x1, y1);
  x = y1;
  y = x1 - y1 * (a / b);
  return d;
}
void fas(long long a, long long b, long long c, long long &x0, long long &y0,
         long long &g) {
  g = gcd(abs(a), abs(b), x0, y0);
  x0 *= c / g;
  y0 *= c / g;
  if (a < 0) x0 = -x0;
  if (b < 0) y0 = -y0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cout.precision(30);
  cerr.precision(10);
  ;
  cin >> n;
  if (n == 4) {
    cout << "YES\n"
         << "1 3 2 4";
    return 0;
  }
  v.push_back(1);
  w[1] = 1;
  for (int i = 1; i < n; i++) {
    long long x = 0, y = 0, z = 0;
    fas(i, -n, i + 1, x, y, z);
    for (long long j = x - (x / n) * n; j <= n; j += n) {
      if ((i * j) % n == i + 1 && !w[j]) {
        v.push_back(j);
        w[j] = 1;
        break;
      }
    }
  }
  if (!w[n]) {
    v.push_back(n);
    w[n] = 1;
  }
  if ((int)v.size() != n) {
    cout << "NO\n";
    return 0;
  }
  w.reset();
  long long x = 1;
  for (int i = 0; i < (int)v.size(); i++) {
    x = (x * v[i]) % n;
    if (w[x]) {
      cout << "NO\n";
      return 0;
    }
    w[x] = 1;
  }
  cout << "YES\n";
  for (auto x : v) cout << x << " ";
  return 0;
}
