#include <bits/stdc++.h>
using namespace std;
bool isprime(int x) {
  for (long long i = 2; i * i <= x; i++)
    if (x % i == 0) return 0;
  return 1;
}
int pow(int a, int k, int P) {
  int re = 1, t = a;
  while (k) {
    if (k & 1) re = (1ll * re * t) % P;
    t = (1ll * t * t) % P;
    k >>= 1;
  }
  return re;
}
int main() {
  int n;
  scanf("%d", &n);
  if (n == 4) {
    puts("YES\n1\n3\n2\n4");
    return 0;
  }
  if (!isprime(n)) {
    puts("NO");
    return 0;
  }
  int lst = 1;
  puts("YES");
  for (int i = 1; i < n; i++) {
    printf("%d\n", (int)(1ll * pow(lst, n - 2, n) * i % n));
    lst = i;
  }
  printf("%d\n", n);
  return 0;
}
