#include <bits/stdc++.h>
using namespace std;
bool isPrim(int n) {
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
long long modPow(long long b, long long p, long long MOD) {
  if (p == 0) return 1;
  if (p % 2 == 0) return modPow((b * b) % MOD, p / 2, MOD);
  return (modPow(b, p - 1, MOD) * b) % MOD;
}
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << "YES\n1";
    return 0;
  }
  if (n == 4) {
    cout << "YES\n1\n3\n2\n4";
    return 0;
  }
  if (!isPrim(n)) {
    cout << "NO";
    return 0;
  }
  int curr = 1;
  cout << "YES\n1\n";
  for (int i = 2; i < n; i++) {
    cout << (1ll * i * modPow(i - 1, n - 2, n)) % n << "\n";
  }
  cout << n;
}
