#include <bits/stdc++.h>
using namespace std;
const int inf = ~0U >> 1;
const long long INF = ~0ULL >> 1;
;
const double pi = acos(-1.0);
template <class T>
inline T sqr(T a) {
  return a * a;
}
template <class T>
inline void read(T &n) {
  char c;
  for (c = getchar(); !(c >= '0' && c <= '9'); c = getchar())
    ;
  n = c - '0';
  for (c = getchar(); c >= '0' && c <= '9'; c = getchar()) n = n * 10 + c - '0';
}
int Pow(int base, int n, int mo) {
  if (n == 0) return 1;
  if (n == 1) return base;
  int tmp = Pow(base, n >> 1, mo);
  tmp = (long long)tmp * tmp % mo;
  if (n & 1) tmp = (long long)tmp * base % mo;
  return tmp;
}
struct point {
  int x, y;
  point() {}
  point(int _x, int _y) : x(_x), y(_y) {}
};
int a[200000], v[200000], n;
int is_prime(int x) {
  for (int i = 2; i * i <= x; ++i)
    if (x % i == 0) return 0;
  return 1;
}
void work(int n) {
  a[n] = n;
  int s = 1;
  for (int i = (1); i <= (n - 1); ++i) s = (long long)s * i % n;
  for (int i = (n - 1); i >= (2); --i)
    a[i] = (long long)i * Pow(i - 1, n - 2, n) % n;
  a[1] = 1;
  puts("YES");
  for (int i = (1); i <= (n); ++i) printf("%d\n", a[i]);
}
int main() {
  scanf("%d", &n);
  if (n == 1) {
    puts("YES");
    puts("1");
  } else if (n == 4) {
    puts("YES");
    puts("1");
    puts("3");
    puts("2");
    puts("4");
  } else if (is_prime(n))
    work(n);
  else
    puts("NO");
  return 0;
}
