#include <bits/stdc++.h>
inline int lgput(int a, int n, int mod) {
  if (a == 0) return 1;
  int r = 1;
  while (n) {
    if (n % 2) r = 1LL * r * a % mod;
    a = 1LL * a * a % mod;
    n /= 2;
  }
  return r;
}
inline bool prim(int n) {
  for (int i = 2; i < n; i++)
    if (n % i == 0) return 0;
  return 1;
}
int main() {
  int n;
  fscanf(stdin, "%d", &n);
  if (n == 1)
    fprintf(stdout, "YES\n1\n");
  else if (n == 4)
    fprintf(stdout, "YES\n1\n3\n2\n4\n");
  else if (prim(n)) {
    fprintf(stdout, "YES\n");
    for (int i = 1; i <= n; i++)
      fprintf(stdout, "%d\n",
              int((1LL * i * lgput(i - 1, n - 2, n) - 1) % n + 1));
  } else
    fprintf(stdout, "NO\n");
  fclose(stdin);
  fclose(stdout);
  return 0;
}
