#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX;
const long long INFL = LLONG_MAX;
const int output_precision = 15;
const long double pi = acos(-1);
const bool debug = true;
int N;
long long mypow(long long x, int n) {
  long long res = 1;
  while (n) {
    if (n & 1) (res *= x) %= N;
    n /= 2;
    (x *= x) %= N;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cout.precision(output_precision);
  cout << fixed;
  cout.tie(0);
  cin >> N;
  vector<int> ans;
  if (N == 1) {
    ans.push_back(1);
  } else if (N == 4) {
    ans.push_back(1);
    ans.push_back(3);
    ans.push_back(2);
    ans.push_back(4);
  } else {
    for (long long d = 2; d * d <= N; d++) {
      if (N % d == 0) {
        cout << "NO" << '\n';
        return 0;
      }
    }
    ans.push_back(1);
    for (int i = 2; i < N; i++)
      ans.push_back((1LL * i * mypow(i - 1, N - 2)) % N);
    ans.push_back(N);
  }
  cout << "YES" << '\n';
  for (int(i) = 0, j1234 = ans.size(); (i) < j1234; (i)++)
    cout << ans[i] << '\n';
}
