#include <bits/stdc++.h>
using namespace std;
int n;
long long binpow(int a, int k) {
  if (k == 1) return a;
  if (k % 2 == 1)
    return (1ll * binpow(a, k - 1) * a) % n;
  else {
    long long x = binpow(a, k / 2);
    return ((1ll * x * x) % n);
  }
}
int main() {
  cin >> n;
  if (n == 4) {
    cout << "YES\n";
    cout << "1\n3\n2\n4";
    return 0;
  }
  bool z = false;
  for (int i = 2; i * i <= n; i++) {
    if (i < n && n % i == 0) z = true;
  }
  if (z) {
    cout << "NO";
    return 0;
  }
  cout << "YES\n";
  for (int i = 0; i < n - 1; i++) {
    if (i == 0)
      cout << 1 << "\n";
    else {
      cout << ((i + 1) * binpow(i, n - 2)) % n << "\n";
    }
  }
  cout << n;
  return 0;
}
