#include <bits/stdc++.h>
using namespace std;
long long pow(long long a, long long b, long long c) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % c;
    a = a * a % c;
    b >>= 1;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  if (n < 4) {
    cout << "YES\n";
    for (int i = 0; i < n; ++i) cout << i + 1 << endl;
  } else if (n == 4) {
    cout << "YES\n1\n3\n2\n4\n";
  } else {
    bool flag = false;
    for (int i = 2; i * i <= n; ++i)
      if (n % i == 0) {
        flag = true;
        break;
      }
    if (flag) {
      cout << "NO\n";
      return 0;
    }
    cout << "YES\n";
    cout << 1 << endl;
    long long mod = 1;
    for (int i = 2; i < n; ++i) {
      long long tmp = pow(mod + 1, n - 2, n);
      mod = mod * tmp % n;
      cout << tmp << endl;
    }
    cout << n << endl;
  }
  return 0;
}
