#include <bits/stdc++.h>
using namespace std;
const long long int maxn = 1000 * 1000;
long long int step(long long int x, long long int pow, long long int mod) {
  if (pow < 0) {
    long long int a = step(x, mod + pow - 1, mod);
    return (a * 1) % mod;
  }
  if (pow == 0) return 1;
  if (pow % 2 == 1) return (step(x, pow - 1, mod) * x) % mod;
  long long int b = step(x, pow / 2, mod);
  return (b * b) % mod;
}
int main() {
  long long int n;
  cin >> n;
  if (n == 1) {
    cout << "YES" << endl << 1;
    return 0;
  }
  if (n == 2) {
    cout << "YES" << endl << 1 << endl << 2;
    return 0;
  }
  if (n == 4) {
    cout << "YES" << endl << 1 << endl << 3 << endl << 2 << endl << 4;
    return 0;
  }
  if (n % 2 == 0) {
    cout << "NO";
    return 0;
  }
  string flag = "bad";
  long long int t = n;
  vector<long long int> ps;
  for (int i = 2; i * i <= t; i++) {
    if (t % i == 0) {
      while (t % i == 0) t /= i;
      ps.push_back(i);
    }
  }
  if (t != 1) {
    ps.push_back(t);
  }
  if (ps.size() == 1) flag = "prime";
  if (n % 2 == 0) {
    cout << "NO";
    return 0;
  }
  if ((flag == "bad")) {
    cout << "NO";
    return 0;
  }
  t = n - 1;
  ps.clear();
  for (int i = 2; i * i <= t; i++) {
    if (t % i == 0) {
      while (t % i == 0) t /= i;
      ps.push_back(i);
    }
  }
  if (t != 1) {
    ps.push_back(t);
  }
  long long int phi = n - 1;
  t = phi;
  ps.clear();
  for (int i = 2; i * i <= t; i++) {
    if (t % i == 0) {
      while (t % i == 0) t /= i;
      ps.push_back(i);
    }
  }
  if (t != 1) {
    ps.push_back(t);
  }
  long long int g;
  for (int i = 2; i < n; i++) {
    bool fla = true;
    for (int j = 0; j < ps.size(); j++) {
      if (step(i, phi / ps[j], n) == 1) fla = false;
    }
    if (fla) {
      g = i;
      break;
    }
  }
  cout << "YES" << endl << 1 << endl;
  vector<long long int> ste(n);
  for (int i = 2; i <= n - 1; i++) ste[i] = i - 1;
  for (int i = 3; i <= n - 1; i += 2) ste[i] = -ste[i];
  for (int i = 2; i <= n - 1; i++) {
    long long int e = step(g, ste[i], n);
    cout << e << endl;
  }
  cout << n;
  return 0;
}
