#include <bits/stdc++.h>
const int Mod = (int)1e9 + 7;
const int MX = 1073741822;
const long long MXLL = 4611686018427387903;
const int Sz = 1110111;
using namespace std;
inline void Read_rap() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
}
int n;
long long binpow(long long a, int b, int p) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % p;
    a = (a * a) % p;
    b >>= 1;
  }
  return res;
}
inline bool prime(int n) {
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) return 0;
  return 1;
}
int main() {
  Read_rap();
  cin >> n;
  if (n == 1) {
    cout << "YES\n1";
    return 0;
  }
  if (n == 4) {
    cout << "YES\n1\n3\n2\n4";
    return 0;
  }
  if (prime(n)) {
    cout << "YES" << endl << 1 << endl;
    for (int i = 2; i < n; i++)
      cout << (i * binpow(i - 1, n - 2, n)) % n << endl;
    cout << n << endl;
  } else
    cout << "NO";
  return 0;
}
