#include <bits/stdc++.h>
using namespace std;
long long mod_bin_pow(long long a, long long n, long long m) {
  if (n == 0) return 1;
  if (n % 2 == 0) {
    long long b = mod_bin_pow(a, n / 2, m);
    return (b * b) % m;
  } else
    return (a * mod_bin_pow(a, n - 1, m)) % m;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  if (n == 1) {
    cout << "YES" << endl;
    cout << "1" << endl;
    return 0;
  }
  if (n == 2) {
    cout << "YES" << endl;
    cout << "1" << endl;
    cout << "2" << endl;
    return 0;
  }
  if (n == 4) {
    cout << "YES" << endl;
    cout << "1" << endl;
    cout << "3" << endl;
    cout << "2" << endl;
    cout << "4" << endl;
    return 0;
  }
  int p = 0;
  for (int i = 2; i * i <= n + 1 && p == 0; ++i) {
    if (n % i == 0) p = i;
  }
  if (p == 0) p = n;
  int nn = n;
  int prime_pow = 1;
  while (nn % p == 0) nn /= p;
  if (nn != 1) prime_pow = 0;
  if (prime_pow == 0) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  cout << "1" << endl;
  int phi_n = n - n / p;
  for (int i = 2; i < n; ++i)
    cout << (1 + mod_bin_pow(i - 1, phi_n - 1, n)) % n << endl;
  cout << n << endl;
  return 0;
}
