#include <bits/stdc++.h>
using namespace std;
const bool db = false;
int mod, a[100010];
int mark[100010], color;
int d[100010];
bool prime(int n) {
  for (int i = 2; i * i <= n; ++i)
    if (n % i == 0) return false;
  return true;
}
bool check(int gen, int last) {
  ++color;
  mark[last] = color;
  for (int i = 2; i < mod; ++i) {
    last = (last * 1LL * gen) % mod;
    if (i % 2 == 0) {
      a[i] = last;
    }
    last = (last * 1LL * gen) % mod;
    if (mark[last] == color) return false;
    mark[last] = color;
  }
  return true;
}
int inv(int a, int p, int mod) {
  int r = 1;
  while (p > 0) {
    if (p & 1) r = (r * 1LL * a) % mod;
    a = (a * 1LL * a) % mod;
    p /= 2;
  }
  return r;
}
int main() {
  scanf("%d", &mod);
  if (mod == 1) {
    puts("YES");
    cout << 1 << endl;
    exit(0);
  }
  if (mod == 2) {
    cout << "YES\n";
    cout << "1\n2\n";
    return 0;
  }
  if (mod == 4) {
    cout << "YES" << endl;
    cout << "1\n3\n2\n4\n";
    exit(0);
  }
  a[1] = 1;
  a[mod] = mod;
  int gen = 1;
  if (prime(mod)) {
    cout << "YES\n";
    cout << "1\n";
    int last = 1;
    for (int i = 2; i < mod; ++i) {
      cout << (inv(i - 1, mod - 2, mod) * 1LL * i) % mod << "\n";
    }
    cout << mod << "\n";
  } else
    cout << "NO\n";
  getchar();
  getchar();
  return 0;
}
