#include <bits/stdc++.h>
using namespace std;
const int Nmax = 100001;
int N, v[Nmax], inv[Nmax], a[Nmax];
int logpow(int b, int e) {
  int p = 1;
  for (int k = 0; (1 << k) <= e; k++) {
    if ((1 << k) & e) p = (1LL * p * b) % N;
    b = (1LL * b * b) % N;
  }
  return p;
}
int prim(int x) {
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return 0;
  return 1;
}
int main() {
  cin >> N;
  if (N == 1)
    cout << "YES\n1\n";
  else if (N == 4)
    cout << "YES\n1\n3\n2\n4\n";
  else if (!prim(N))
    cout << "NO\n";
  else {
    v[1] = a[1] = 1, v[N] = N;
    for (int i = 1; i <= N; i++) inv[i] = logpow(i, N - 2);
    for (int i = 2; i < N; i++) {
      v[i] = (1LL * inv[a[i - 1]] * i) % N;
      a[i] = (1LL * a[i - 1] * v[i]) % N;
    }
    cout << "YES\n";
    for (int i = 1; i <= N; i++) cout << v[i] << '\n';
  }
  return 0;
}
