#include <bits/stdc++.h>
using namespace std;
long long n;
long long power(long long base, long long expo) {
  if (base <= 1) return 1;
  long long ans = 1;
  while (expo) {
    if (expo & 1) {
      ans = (ans * base) % n;
    }
    base = (base * base) % n;
    expo >>= 1;
  }
  return ans;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  if (n == 4) {
    cout << "YES\n1\n3\n2\n4\n";
    return 0;
  }
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      cout << "NO";
      return 0;
    }
  }
  vector<long long> mark(n);
  cout << "YES\n";
  for (long long i = 1; i <= n; i++) {
    long long prnt = i * power(i - 1, n - 2) % n;
    assert(!mark[prnt]);
    mark[prnt] = 1;
    if (!prnt) prnt += n;
    cout << prnt << endl;
  }
  return 0;
}
