#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)1e5 + 11;
const int inf = int(1e9);
const int mod = inf + 7;
const double eps = 1e-9;
const double pi = acos(-1.0);
int n;
int a[maxn];
bool check(int n) {
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
int binpow(int a, int k, int mod) {
  if (k == 0) return 1;
  int ans = binpow(a, k / 2, mod);
  ans = 1ll * ans * ans % mod;
  if (k % 2) ans = 1ll * ans * a % mod;
  return ans;
}
int inv(int a, int mod) { return binpow(a, mod - 2, mod); }
int main() {
  cin >> n;
  if (n == 1) {
    printf("YES\n1\n");
    return 0;
  }
  if (n == 4) {
    printf("YES\n1\n3\n2\n4\n");
    return 0;
  }
  if (!check(n)) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  a[0] = 1;
  int x = 1;
  for (int i = 1; i < n - 1; i++) {
    int y = inv(x, n) * 1ll * (i + 1) % n;
    a[i] = y;
    x = 1ll * x * y % n;
  }
  a[n - 1] = n;
  for (int i = 0; i < n; i++) printf("%d\n", a[i]);
  return 0;
}
