#include <bits/stdc++.h>
using namespace std;
long long n, p[100100], cnt, flag[100100], inv[100100];
void shai() {
  for (long long i = 2; i <= n; i++) {
    if (flag[i] == 0) p[++cnt] = i;
    for (long long j = 1; j <= cnt && i * p[j] <= n; j++) {
      flag[i * p[j]] = 1;
      if (i % p[j] == 0) break;
    }
  }
}
int main() {
  scanf("%lld", &n);
  if (n == 1) {
    printf("YES\n");
    printf("1\n");
    return 0;
  }
  if (n == 2) {
    printf("YES\n");
    printf("1\n2\n");
    return 0;
  }
  if (n == 3) {
    printf("YES\n");
    printf("1\n2\n3\n");
    return 0;
  }
  if (n == 4) {
    printf("YES\n");
    printf("1\n3\n2\n4\n");
    return 0;
  }
  shai();
  if (flag[n] == 0)
    printf("YES\n");
  else {
    printf("NO\n");
    return 0;
  }
  inv[1] = 1;
  for (long long i = 2; i <= n - 1; i++) {
    inv[i] = ((n - n / i) * inv[n % i]) % n;
  }
  printf("1\n");
  for (long long i = 2; i <= n - 1; i++) {
    long long ans = i * inv[i - 1];
    ans %= n;
    printf("%lld\n", ans);
  }
  printf("%lld\n", n);
  return 0;
}
