#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int Mod = 1000000007;
const int INF = 0x3f3f3f3f;
const long long LL_INF = 0x3f3f3f3f3f3f3f3f;
const double e = exp(1);
const double PI = acos(-1);
const double ERR = 1e-10;
bool isnotprime[maxn];
long long prime[maxn];
int cnt = 0;
void linearsieve(long long range) {
  for (long long i = 2; i <= range; i++) {
    if (!isnotprime[i]) prime[++cnt] = i;
    for (int j = 1; j <= cnt; j++) {
      if (i * prime[j] > range) break;
      isnotprime[i * prime[j]] = true;
      if (i % prime[j] == 0) break;
    }
  }
}
long long a[maxn], prefix[maxn];
long long inv[maxn];
void get_inv(int range, int mod) {
  inv[1] = 1 % mod;
  for (int i = 2; i <= range; i++) {
    inv[i] = inv[mod % i] * (-mod / i + mod) % mod;
  }
}
int main() {
  int n;
  linearsieve(100000);
  scanf("%d", &n);
  if (n == 4) {
    puts("YES");
    puts("1");
    puts("3");
    puts("2");
    puts("4");
    return 0;
  }
  if (isnotprime[n]) {
    puts("NO");
    return 0;
  }
  get_inv(n, n);
  a[1] = 1;
  prefix[1] = 1;
  a[n] = n;
  for (int i = 2; i < n; i++) {
    a[i] = 1LL * i * inv[prefix[i - 1]] % n;
    prefix[i] = prefix[i - 1] * a[i] % n;
  }
  puts("YES");
  for (int i = 1; i <= n; i++) {
    printf("%lld\n", a[i]);
  }
  return 0;
}
