#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b, long long m = 1000000007) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = (res * a) % m;
    a = (a * a) % m;
    b >>= 1;
  }
  return res;
}
long long inverse(long long a, long long m = 1000000007) {
  return power(a, m - 2, m);
}
vector<int> primes;
vector<int> is_comp;
void sieve(int mx) {
  is_comp.assign(mx, 0);
  for (int i = 2; i < mx; i++) {
    if (!is_comp[i]) primes.push_back(i);
    for (int j = 0; j < primes.size() && primes[j] * i < mx; j++) {
      is_comp[i * primes[j]] = 1;
      if (i % primes[j] == 0) break;
    }
  }
}
int main() {
  int n;
  cin >> n;
  sieve(n + 1);
  if (n == 1)
    cout << "YES\n" << 1 << endl;
  else if (n == 4)
    cout << "YES\n" << 1 << '\n' << 3 << '\n' << 2 << '\n' << 4 << endl;
  else {
    if (is_comp[n]) {
      cout << "NO" << endl;
      return 0;
    }
    cout << "YES" << endl;
    cout << 1 << endl;
    for (int i = 2; i <= n; i++) {
      long long p = i * inverse(i - 1, n);
      p %= n;
      if (p == 0) p = n;
      cout << p << endl;
    }
  }
}
