#include <bits/stdc++.h>
using namespace std;
long long pow_mod(long long a, long long x, long long p) {
  long long res = 1;
  while (x) {
    if (x & 1) res = res * a % p;
    x >>= 1;
    a = a * a % p;
  }
  return res;
}
vector<long long> a;
bool g_test(long long g, long long p) {
  for (long long i = 0; i < a.size(); i++)
    if (pow_mod(g, (p - 1) / a[i], p) == 1) return 0;
  return 1;
}
long long primitive_root(long long p) {
  a.clear();
  long long tmp = p - 1;
  for (long long i = 2; i <= tmp / i; i++)
    if (tmp % i == 0) {
      a.push_back(i);
      while (tmp % i == 0) tmp /= i;
    }
  if (tmp != 1) a.push_back(tmp);
  long long g = 1;
  while (true) {
    if (g_test(g, p)) return g;
    g++;
  }
}
int ans[100000 + 10], valid[100000 + 10], tot = 0;
void getPrime(int n, int &tot, int ans[]) {
  for (int i = 2; i <= n; i++) {
    if (!valid[i]) ans[tot++] = i;
    for (int j = 0; j < tot && i * ans[j] <= n; j++) {
      valid[i * ans[j]] = 1;
      if (i % ans[j] == 0) break;
    }
  }
}
int out[100000 + 10];
int fk[100000 + 10];
int main() {
  getPrime(1e5, tot, ans);
  long long n, g;
  cin >> n;
  if (n == 1) {
    puts("YES");
    cout << 1 << endl;
    return 0;
  }
  if (n == 2) {
    puts("YES");
    cout << 1 << endl << 2 << endl;
    return 0;
  }
  if (n == 4) {
    puts("YES");
    printf("1\n3\n2\n4\n");
    return 0;
  }
  if (valid[n])
    puts("NO");
  else {
    puts("YES");
    g = primitive_root(n);
    long long x = 1;
    for (int i = 1; i <= n - 1; i++) {
      x = x * g % n;
      out[i] = x;
    }
    fk[1] = n - 1, fk[(n + 1) / 2] = (n - 1) / 2;
    int st = 2, ed = n - 1;
    int X = n - 2, y = 1;
    int cnt = 0;
    while (X > y) {
      fk[st] = X;
      fk[ed] = y;
      cnt++;
      if (cnt % 2 == 0) swap(fk[st], fk[ed]);
      X--, y++;
      st++, ed--;
    }
    for (int i = 1; i <= n - 1; i++) cout << out[fk[i]] << endl;
    cout << n << endl;
  }
  return 0;
}
