#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
  int f = 1;
  char k = getchar();
  x = 0;
  for (; k > '9' || k < '0'; k = getchar())
    if (k == '-') f = -1;
  for (; k >= '0' && k <= '9'; k = getchar()) x = (x << 3) + (x << 1) + k - '0';
  x *= f;
}
template <class T>
inline void _print(T x) {
  if (x / 10) _print(x / 10);
  putchar(x % 10 + '0');
}
template <class T>
inline void print(T x) {
  if (x < 0) putchar('-'), x = -x;
  _print(x);
}
long long mul(long long a, long long b, long long mod) {
  long double c = 1.;
  return (a * b - (long long)(c * a * b / mod) * mod) % mod;
}
inline int qpow(int x, int m, int mod) {
  int res = 1, bas = x;
  while (m) {
    if (m & 1) res = (1ll * res * bas) % mod;
    bas = (1ll * bas * bas) % mod, m >>= 1;
  }
  return res;
}
const int N = 1e5 + 5;
int n;
inline bool is_pri(int x) {
  for (register int i = 2; i * i <= x; ++i)
    if (x % i == 0) return false;
  return true;
}
int main() {
  read(n);
  if (n == 1) {
    puts("YES");
    print(1);
    return 0;
  }
  if (n == 4) {
    puts("YES");
    printf("1\n3\n2\n4");
    return 0;
  }
  if (is_pri(n)) {
    puts("YES");
    printf("1\n");
    for (register int i = 2; i < n; ++i)
      printf("%d\n", (1ll * i * qpow(i - 1, n - 2, n)) % n);
    print(n);
  } else
    puts("NO");
  return 0;
}
