#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long maxn = 1e6 + 7;
inline long long read() {
  long long res = 0, tmp = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') tmp = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    res = (res << 1) + (res << 3) + (ch ^ 48), ch = getchar();
  return res * tmp;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
long long max(long long a, long long b) { return a > b ? a : b; }
long long min(long long a, long long b) { return a < b ? a : b; }
void hour() {
  cerr << 't' << 'i' << 'm' << 'e' << ':' << 1.0 * clock() / CLOCKS_PER_SEC
       << 's' << endl;
}
void fre() {
  freopen("CF487C.in", "r", stdin);
  freopen("CF487C.out", "w", stdout);
}
long long n;
bool zs(long long x) {
  if (x == 1) return false;
  for (register long long i = 2; i <= sqrt(x); i++) {
    if (x % i == 0) return false;
  }
  return true;
}
long long ksm(long long x, long long k) {
  long long tmp = 1;
  while (k != 0) {
    if (k % 2 != 0) tmp *= x, tmp %= n;
    x *= x;
    x %= n;
    k >>= 1;
  }
  return tmp % n;
}
int main() {
  n = read();
  if (n == 4) {
    puts("YES");
    puts("1");
    puts("3");
    puts("2");
    puts("4");
    return 0;
  }
  if (n == 1) {
    puts("YES");
    puts("1");
    return 0;
  }
  if (!zs(n)) {
    puts("NO");
    return 0;
  }
  puts("YES");
  puts("1");
  for (register long long i = 2; i <= n - 1; i++) {
    write((i * ksm(i - 1, n - 2)) % n);
    puts("");
  }
  write(n);
  puts("");
  return 0;
}
