#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int modPow(int base, int pow, int mod) {
  int res = 1;
  while (pow > 0) {
    if (pow % 2) res = (1ll * res * base) % mod;
    base = (base * 1ll * base) % mod;
    pow /= 2;
  }
  return res;
}
int modInv(int u, int mod) { return modPow(u, mod - 2, mod); }
bool isPrime(int u) {
  for (int i = 2; i * i <= u; ++i) {
    if (u % i == 0) return false;
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << "YES" << endl;
    cout << 1 << endl;
    return 0;
  }
  if (n == 4) {
    cout << "YES" << endl;
    cout << 1 << endl;
    cout << 3 << endl;
    cout << 2 << endl;
    cout << 4 << endl;
    return 0;
  }
  if (!isPrime(n)) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  cout << 1 << endl;
  for (int i = 2; i <= n - 1; ++i) {
    cout << (1ll * modInv(i - 1, n) * i) % n << endl;
  }
  cout << n << endl;
  return 0;
}
