#include <bits/stdc++.h>
using namespace std;
const int maxx = 1e5 + 20;
long long ip[maxx];
void era() {
  for (int i = 2; i < maxx; i++) {
    if (!ip[i])
      for (int j = i * 2; j < maxx; j += i) ip[j] = true;
  }
}
long long n, mod;
long long pw(long long a, long long b) {
  if (!b) return 1ll;
  long long x = pw(a, b / 2);
  x = (x * x) % mod;
  if (b % 2) x = (x * a) % mod;
  return x;
}
int main() {
  cin >> n;
  if (n == 1) return cout << "YES" << endl << 1 << endl, 0;
  if (n == 4)
    return cout << "YES" << endl
                << 1 << endl
                << 3 << endl
                << 2 << endl
                << 4 << endl,
           0;
  era();
  mod = n;
  if (ip[n]) return cout << "NO" << endl, 0;
  cout << "YES" << endl << 1 << endl;
  for (int i = 2; i <= n; i++) {
    long long x = i;
    x = (x * pw(i - 1, n - 2)) % mod;
    cout << (!x ? n : x) << endl;
  }
  return 0;
}
