#include <bits/stdc++.h>
long long gi() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) f ^= ch == '-', ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f ? x : -x;
}
int pow(int x, int y) {
  int ret = 1, p = y + 2;
  while (y) {
    if (y & 1) ret = 1ll * ret * x % p;
    x = 1ll * x * x % p;
    y >>= 1;
  }
  return ret;
}
int main() {
  int n = gi();
  if (n == 1) return puts("YES\n1\n"), 0;
  if (n == 4) return puts("YES\n1\n3\n2\n4\n"), 0;
  for (int i = 2; i < n; ++i)
    if (n % i == 0) return puts("NO"), 0;
  puts("YES");
  puts("1");
  for (int i = 1; i <= n - 2; ++i)
    printf("%d\n", 1ll * (i + 1) * pow(i, n - 2) % n);
  printf("%d\n", n);
  return 0;
}
