#include <bits/stdc++.h>
using namespace std;
long long n;
long long expMod(long long base, long long ex, long long mod) {
  if (ex == 0) return 1;
  long long temp = expMod(base, ex / 2, mod);
  temp = (temp * temp) % mod;
  if (ex % 2) temp = (temp * base) % mod;
  return temp;
}
bool isPrime(int n) {
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
int main() {
  cin >> n;
  if (n == 1) {
    cout << "YES\n1\n";
    return 0;
  } else if (n == 4) {
    cout << "YES\n1\n3\n2\n4\n";
    return 0;
  }
  if (isPrime(n)) {
    cout << "YES\n1\n";
    for (int i = 2; i < n; i++) {
      cout << (i * expMod(i - 1, n - 2, n)) % n << "\n";
    }
    cout << n << "\n";
  } else {
    cout << "NO\n";
  }
  return 0;
}
