#include <bits/stdc++.h>
using namespace std;
long long mod;
long long binPow(long long a, long long q) {
  a %= mod;
  if (q == 0) return 1;
  if (q % 2 == 1)
    return a * binPow(a * a, q / 2) % mod;
  else
    return binPow(a * a, q / 2) % mod;
}
bool prime(int x) {
  if (x % 2 == 0) return false;
  if (x % 3 == 0) return false;
  for (int i = 4; i <= sqrt(x); i++)
    if (x % i == 0) return false;
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  if (n > 4 && prime(n) == false) {
    cout << "NO";
    return 0;
  }
  cout << "YES\n";
  if (n == 1)
    cout << 1;
  else if (n == 2)
    cout << 1 << endl << 2;
  else if (n == 3)
    cout << 1 << endl << 2 << endl << 3;
  else if (n == 4)
    cout << 1 << endl << 3 << endl << 2 << endl << 4;
  else {
    mod = n;
    cout << 1 << endl;
    int cnt = 2;
    while (cnt != n) {
      long long t = cnt * binPow(cnt - 1, n - 2) % mod;
      t %= n;
      cout << t << endl;
      cnt++;
    }
    cout << n;
  }
}
