#include <bits/stdc++.h>
using namespace std;
long long pwr(long long k, long long pw, long long mod) {
  if (pw == 0) return 1LL;
  long long pw1 = pw % 2LL;
  long long pwr1 = pwr(k, pw / 2LL, mod);
  if (pw1 == 0)
    return (pwr1 * pwr1) % mod;
  else
    return (((pwr1 * pwr1) % mod) * k) % mod;
}
long long obr(long long k, long long mod) { return pwr(k, mod - 2, mod); }
int main() {
  long long int n;
  cin >> n;
  if (n == 1LL) {
    cout << "YES\n1";
    return 0;
  }
  if (n == 4LL) {
    cout << "YES\n1\n3\n2\n4";
    return 0;
  }
  long long int i = 2LL;
  while (i < n)
    if (n % i++ == 0) {
      cout << "NO";
      return 0;
    }
  cout << "YES\n1\n";
  i = 2LL;
  while (i < n) {
    cout << (i * obr(i - 1LL, n)) % n << endl;
    i++;
  }
  cout << n;
  return 0;
}
