#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 1;
  char c = getchar();
  while (c > '9' || c < '0') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return f * x;
}
int n, mrb[7] = {2, 3, 5, 7, 11, 13, 23};
long long pow_mod(long long a, long long b, long long mod) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    b >>= 1;
    a = a * a % mod;
  }
  return ans;
}
long long ji[100003], invji[100003], st[70], top;
bool MR(long long x) {
  if (x == 1) return 0;
  int p = x - 1, t = 0;
  while (p % 2 == 0) t++, p >>= 1;
  for (int i = 0; i < 7; ++i) {
    int now = mrb[i];
    if (x == now) return 1;
    st[0] = pow_mod(now, p, x);
    for (int i = 1; i <= t; ++i) {
      st[i] = st[i - 1] * st[i - 1] % x;
      if (st[i] == 1 && st[i - 1] != x - 1 && st[i - 1] != 1) return 0;
    }
    if (st[t] != 1) return 0;
  }
  return 1;
}
int main() {
  n = read();
  if (n == 1) {
    cout << "YES" << '\n';
    cout << 1 << '\n';
    return 0;
  }
  if (n == 4) {
    cout << "YES" << '\n';
    cout << 1 << '\n' << 3 << '\n' << 2 << '\n' << 4 << '\n';
    return 0;
  }
  if (MR(n)) {
    cout << "YES" << '\n';
    cout << 1 << '\n';
    for (int i = 2; i < n; ++i)
      cout << i * pow_mod(i - 1, n - 2, n) % n << '\n';
    cout << n << '\n';
  } else {
    cout << "NO";
  }
  return 0;
}
