#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
bool prime(int n) {
  for (int i = 2; i * i <= n; ++i) {
    if (n % i == 0) return false;
  }
  return true;
}
long long egcd(long long a, long long b, long long& x, long long& y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  long long d = egcd(b, a % b, x, y);
  x -= a / b * y;
  swap(x, y);
  return d;
}
long long mod_inv(long long a, long long m) {
  long long x, y, d = egcd(a, m, x, y);
  return d == 1 ? (x % m + m) % m : -1;
}
int main() {
  cin.sync_with_stdio(false);
  int n;
  cin >> n;
  if (n == 1) {
    cout << "YES\n1\n";
    return 0;
  }
  if (n == 4) {
    cout << "YES\n1\n3\n2\n4\n";
    return 0;
  }
  if (!prime(n)) {
    cout << "NO\n";
    return 0;
  }
  cout << "YES\n1\n";
  for (auto i = (2); i < (n); ++i) {
    cout << (i * mod_inv(i - 1, n)) % n << '\n';
  }
  cout << n << '\n';
}
