#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n;
long long ny[N], ans[N];
bool prime[N];
void init() {
  prime[0] = prime[1] = false;
  for (int i = 2; i < N; ++i) prime[i] = true;
  for (int i = 2; i * i <= N; ++i) {
    if (!prime[i]) continue;
    for (int j = i * 2; j < N; j += i) prime[j] = false;
  }
}
long long inv(long long a, long long m) {
  long long p = 1, q = 0, b = m, c, d;
  while (b > 0) {
    c = a / b;
    d = a;
    a = b;
    b = d % b;
    d = p;
    p = q;
    q = d - c * q;
  }
  return p < 0 ? p + m : p;
}
int main() {
  init();
  while (~scanf("%d", &n)) {
    if (n == 1) {
      printf("YES\n1\n");
    } else if (n == 2) {
      printf("YES\n1\n2\n");
    } else if (n == 2) {
      printf("YES\n1\n2\n3\n");
    } else if (n == 4) {
      printf("YES\n1\n3\n2\n4\n");
    } else if (!prime[n]) {
      printf("NO\n");
    } else {
      printf("YES\n");
      for (int i = 1; i < n; ++i) ny[i] = inv(i, n);
      ans[1] = 1, ans[n] = n;
      for (int i = 2; i < n; ++i) ans[i] = 1LL * i * ny[i - 1] % n;
      for (int i = 1; i <= n; ++i) printf("%lld\n", ans[i]);
    }
  }
  return 0;
}
