#include <bits/stdc++.h>
bool IsPrime(int n) {
  for (int i = 2; i * i <= n; ++i)
    if (n % i == 0) return false;
  return true;
}
int Res(int a, int p) {
  int x, q, r0 = a, r1 = p, s0 = 1, s1 = 0, t0 = 0, t1 = 1;
  while (r1) {
    q = r0 / r1;
    x = r1;
    r1 = r0 - q * r1;
    r0 = x;
    x = s1;
    s1 = s0 - q * s1;
    s0 = x;
    x = t1;
    t1 = t0 - q * t1;
    t0 = x;
  }
  if (s0 >= 0)
    return ((s0 + 1) % p);
  else {
    s0 = -s0;
    s0 %= p;
    s0 = p - s0;
    return (s0 + 1);
  }
}
int main() {
  int n;
  scanf("%d", &n);
  if (n == 1) {
    printf("YES\n1");
    return 0;
  }
  if (n == 2) {
    printf("YES\n1\n2");
    return 0;
  }
  if (n == 4) {
    printf("YES\n1\n3\n2\n4");
    return 0;
  }
  if (IsPrime(n)) {
    printf("YES\n1\n2\n");
    for (int i = 2; i < n - 1; ++i) printf("%d\n", Res(i, n));
    printf("%d", n);
  } else
    printf("NO");
  return 0;
}
