#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
int n;
int sum(int a, int b) {
  a += b;
  if (a >= n) a -= n;
  return a;
}
int mul(int a, int b) { return 1LL * a * b % n; }
int power(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = mul(res, a);
    a = mul(a, a);
    b >>= 1;
  }
  return res;
}
int main() {
  cin >> n;
  int help = 1;
  for (int i = 2; i < n; i++) help = mul(help, i);
  if (help == 0) {
    cout << "NO";
    return 0;
  } else if (n == 4) {
    cout << "YES\n1\n3\n2\n4";
    return 0;
  }
  cout << "YES\n1\n";
  for (int i = 2; i < n; i++) cout << mul(i, power(i - 1, n - 2)) << '\n';
  if (n > 1) cout << n;
  return 0;
}
