#include <bits/stdc++.h>
using namespace std;
typedef pair<long long, long long> ll;
typedef vector<long long> vl;
typedef vector<ll> vll;
typedef vector<vl> vvl;
template <typename T>
ostream &operator<<(ostream &o, vector<T> v) {
  if (v.size() > 0) o << v[0];
  for (unsigned i = 1; i < v.size(); i++) o << " " << v[i];
  return o << "\n";
}
template <typename U, typename V>
ostream &operator<<(ostream &o, pair<U, V> p) {
  return o << "(" << p.first << ", " << p.second << ") ";
}
template <typename T>
istream &operator>>(istream &in, vector<T> &v) {
  for (unsigned i = 0; i < v.size(); i++) in >> v[i];
  return in;
}
template <typename T>
istream &operator>>(istream &in, pair<T, T> &p) {
  in >> p.first;
  in >> p.second;
  return in;
}
long long inv(long long a, long long m) {
  long long m0 = m, t, q;
  long long x0 = 0, x1 = 1;
  if (m == 1) return 0;
  while (a > 1) {
    q = a / m;
    t = m;
    m = a % m, a = t;
    t = x0;
    x0 = x1 - q * x0;
    x1 = t;
  }
  if (x1 < 0) x1 += m0;
  return x1;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(20);
  long long n;
  cin >> n;
  if (n == 1 or n == 2 or n == 3) {
    cout << "YES\n";
    for (long long i = (1); i < (long long)n + 1; i++) cout << i << "\n";
    return 0;
  }
  if (n == 4) {
    cout << "YES\n1\n3\n2\n4\n";
    return 0;
  }
  bool prime = true;
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) prime = false;
  if (prime) {
    long long x = 2;
    cout << "YES"
         << "\n";
    cout << "1\n2\n";
    while (x != n - 1) {
      long long y = inv(x, n);
      cout << (y * (x + 1)) % n << "\n";
      x++;
    }
    cout << n << "\n";
  } else
    cout << "NO"
         << "\n";
  return 0;
}
