#include <bits/stdc++.h>
using namespace std;
long long pow(long long A, long long B, long long P) {
  if (!B) return 1 % P;
  long long h = pow(A, B / 2, P);
  h *= h;
  h %= P;
  if (B % 2) h *= A;
  return h % P;
}
int n, i, ans;
int main() {
  cin >> n;
  if (n > 4) {
    for (i = 1; i * i <= n; i++)
      if (n % i == 0) ans++;
    if (ans > 1) {
      cout << "NO" << endl;
      return 0;
    }
    cout << "YES" << endl;
    cout << 1 << endl;
    long long mod = 1;
    for (int i = 3; i <= n; ++i) {
      long long tmp = pow(mod + 1, n - 2, n);
      cout << tmp << endl;
      mod = mod * tmp % n;
    }
    cout << n << endl;
  } else {
    cout << "YES" << endl;
    if (n == 4)
      cout << 1 << endl << 3 << endl << 2 << endl << 4 << endl;
    else {
      for (i = 1; i <= n; i++) cout << i << endl;
    }
  }
}
