#include <bits/stdc++.h>
using namespace std;
int i, j, k, n, m, g, phi, l, r;
int p[100010], f[100010], F[100010], a[100010], b[100010];
inline long long pow(long long x, long long y, long long mo) {
  long long an = 1;
  for (; y; y >>= 1) {
    if (y & 1) an = an * x % mo;
    x = x * x % mo;
  }
  return an;
}
int main() {
  for (i = 2; i <= 100010 - 1; i++) {
    if (!f[i]) f[i] = p[++*p] = i;
    for (j = 1; j <= *p && p[j] <= f[i] && i * p[j] < 100010; j++)
      f[i * p[j]] = p[j];
  }
  scanf("%d", &n);
  if (n == 1) {
    printf("YES\n1\n");
    return 0;
  }
  if (n == 4) {
    printf("YES\n1\n3\n2\n4\n");
    return 0;
  }
  if (f[n] != n) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  phi = n - 1;
  for (g = 2;; g++) {
    int F = 0;
    for (i = 1; i * i <= phi; i++)
      if (phi % i == 0) {
        if (i < phi && pow(g, i, n) == 1) F = 1;
        if (i > 1 && pow(g, phi / i, n) == 1) F = 1;
      }
    if (!F) break;
  }
  int t = phi / 2;
  l = 1, r = t - 1;
  for (i = 2; i <= t; i++)
    if (i & 1)
      a[i] = r--;
    else
      a[i] = l++;
  for (i = 1; i <= t; i++) a[phi - i + 1] = a[i] + t;
  swap(a[t], a[t + 1]);
  for (i = 2; i <= phi; i++) {
    b[i] = a[i] - a[i - 1];
    if (b[i] < 0) b[i] += phi;
  }
  for (i = 1; i <= phi; i++) printf("%d\n", pow(g, b[i], n));
  printf("%d\n", n);
  return 0;
}
