#include <bits/stdc++.h>
using namespace std;
long long int n, ob[100007], fak[100007], obfak[100007],
    mod = 5, k, ans[100007], st[100007];
char c[100007];
map<long long int, long long int> q;
void solve() {
  long long int i, j, sum = 0, p;
  for (i = 0; i < 100007; i++) {
    st[i] = 0;
  }
  p = n;
  if (n == 4) {
    printf("YES\n1\n3\n2\n4");
    return;
  }
  for (i = 2; i <= sqrt((double)n); i++) {
    if (n % i == 0) {
      printf("NO\n");
      return;
    }
  }
  mod = n;
  fak[0] = 1;
  obfak[0] = 1;
  fak[1] = 1;
  ob[1] = 1;
  for (i = 2; i < 100007; i++) {
    ob[i] = (mod * mod - ((mod / i) * (ob[mod % i]))) % mod;
  }
  ans[1] = 1;
  ans[n] = n;
  st[1] = 1;
  st[0] = 1;
  for (i = 2; i < n; i++) {
    if (st[(i * ob[i - 1]) % n] == 1) {
      printf("NO\n");
      return;
    } else {
      ans[i] = (i * ob[i - 1]) % n;
      st[(i * ob[i - 1]) % n] = 1;
    }
  }
  printf("YES\n");
  for (i = 1; i <= n; i++) {
    printf("%I64d\n", ans[i]);
  }
}
int main() {
#pragma comment(linker, "/STACK:67108864")
  while (scanf("%I64d", &n) != EOF) {
    solve();
  }
  return 0;
}
