#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)1e6 + 100;
const double pi = acos(-1.0);
int n, ok, mod;
int binpow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = (res * 1ll * a) % mod;
    b >>= 1;
    a = (a * 1ll * a) % mod;
  }
  return res;
}
int main() {
  cin >> n;
  if (n == 1) {
    cout << "YES\n1";
    return 0;
  }
  if (n == 4) {
    cout << "YES\n1 3 2 4";
    return 0;
  }
  mod = n;
  for (int i = (2); i <= (n - 1); ++i)
    if (n % i == 0) ok = 1;
  if (ok) {
    cout << "NO";
    return 0;
  }
  cout << "YES\n1\n";
  for (int i = (2); i <= (n - 1); ++i) {
    cout << (i * 1ll * binpow(i - 1, mod - 2)) % mod << endl;
  }
  cout << n;
}
