#include <bits/stdc++.h>
using namespace std;
int n;
long long logPow(long long a, int b) {
  if (b == 0) return 1;
  long long ans = logPow(a, b / 2);
  ans = (ans * ans) % n;
  if (b % 2)
    return (ans * a) % n;
  else
    return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  if (n == 1) {
    cout << "YES\n1\n";
    return 0;
  } else if (n == 4) {
    cout << "YES\n1 3 2 4\n";
    return 0;
  }
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) {
      cout << "NO" << endl;
      return 0;
    }
  cout << "YES\n";
  cout << 1 << "\n";
  for (int i = 2; i < n; i++) cout << (logPow(i - 1, n - 2) * i) % n << "\n";
  cout << n << "\n";
}
