#include <bits/stdc++.h>
using namespace std;
bool isPrime(long long N) {
  if (N < 2) return false;
  if (N < 4) return true;
  if ((N & 1) == 0) return false;
  if (N % 3 == 0) return false;
  long long curr = 5;
  while (curr <= sqrt(N)) {
    if (N % curr == 0) return false;
    curr += 2;
    if (N % curr == 0) return false;
    curr += 4;
  }
  return true;
}
long long expo(long long base, long long exponent, long long mod) {
  long long ans = 1;
  while (exponent != 0) {
    if ((exponent & 1) == 1) {
      ans = ans * base;
      ans = ans % mod;
    }
    base = base * base;
    base %= mod;
    exponent >>= 1;
  }
  return ans % mod;
}
void solve() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << "YES\n1";
  } else if (n == 4) {
    cout << "YES\n1 3 2 4";
  } else if (!isPrime(n)) {
    cout << "NO";
  } else {
    cout << "YES\n";
    vector<int> ans;
    ans.push_back(1);
    for (int i = 1; i < n; i++) {
      ans.push_back((1LL * (i + 1) * expo(i, n - 2, n)) % n);
    }
    for (auto i : ans) {
      cout << (i % n ? i % n : n) << '\n';
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
