#include <bits/stdc++.h>
using namespace std;
long long p;
long long bin(long long x, long long y) {
  if (y == 1) return x;
  if (y % 2) return ((bin(x, y / 2) * bin(x, y / 2) % p) * x) % p;
  return (bin(x, y / 2) * bin(x, y / 2)) % p;
}
int n;
int main() {
  cin >> n;
  if (n < 5) {
    if (n == 1) {
      cout << "YES" << endl;
      cout << "1";
    }
    if (n == 2) {
      cout << "YES" << endl;
      cout << "1" << endl;
      cout << "2";
    }
    if (n == 3) {
      cout << "YES" << endl;
      cout << "1" << endl;
      cout << "2" << endl;
      cout << "3";
    }
    if (n == 4) {
      cout << "YES" << endl;
      cout << "1" << endl;
      cout << "3" << endl;
      cout << "2" << endl;
      cout << "4";
    }
    return 0;
  }
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) {
      cout << "NO" << endl;
      return 0;
    }
  cout << "YES" << endl;
  long long a[111111], s = 1ll;
  a[1] = 1ll;
  a[n] = n;
  p = n;
  for (long long i = 2ll; i < n; i++) {
    a[i] = (i * bin(s, p - 2ll)) % p;
    s *= a[i];
    s %= p;
  }
  for (int i = 1; i <= n; i++) cout << a[i] << endl;
  return 0;
}
