#include <bits/stdc++.h>
using namespace std;
long long binpow(long long base, long long expo, long long mod) {
  long long ans = 1;
  while (expo) {
    if (expo % 2) ans = (ans * base) % mod;
    base = (base * base) % mod;
    expo /= 2;
  }
  return ans;
}
bool prime(long long x) {
  if (x < 2) return false;
  for (long long i = 2; i <= sqrt(x); i++) {
    if (x % i == 0) return false;
  }
  return true;
}
signed main() {
  long long n;
  cin >> n;
  if (n == 1)
    cout << "YES\n1";
  else if (n == 2)
    cout << "YES\n1\n2";
  else if (n == 4)
    cout << "YES\n1\n3\n2\n4";
  else {
    if (prime(n) == false)
      cout << "NO";
    else {
      cout << "YES" << endl;
      for (long long i = 0; i < n; i++) cout << binpow(i, n - 2, n) + 1 << endl;
    }
  }
}
