#include <bits/stdc++.h>
using namespace std;
long long x, y, n, m, s, l;
long long fpw(long long b, int p) {
  long long ret = 1;
  while (p) {
    if (p & 1) ret = (b * ret) % n;
    b = (b * b) % n;
    p /= 2;
  }
  return ret;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  if (n == 1) {
    cout << "YES" << endl << 1;
    return 0;
  }
  if (n == 4) {
    cout << "YES\n1\n3\n2\n4";
    return 0;
  }
  for (int i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES" << endl << 1 << endl;
  for (long long i = 2; i < n; ++i) cout << ((i)*fpw(i - 1, n - 2)) % n << endl;
  cout << n;
}
