#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int a[N], n;
long long mpow(long long x, int c) {
  long long ret = 1;
  while (c) {
    if (c & 1) ret = (ret * x) % n;
    c >>= 1;
    x = (x * x) % n;
  }
  return ret;
}
int main() {
  cin >> n;
  int i;
  a[1] = 1, a[2] = 2;
  for (i = 3; i < n; ++i) {
    if (n % i == 0) {
      printf("NO\n");
      return 0;
    }
    a[i] = (mpow(i - 1, n - 2) * i) % n;
  }
  if (n == 4) a[2] = 3, a[3] = 2;
  a[n] = n;
  printf("YES\n");
  for (i = 1; i <= n; ++i) printf("%d\n", a[i]);
}
