#include <bits/stdc++.h>
using namespace std;
long n;
long long pow1(long long a, long long b, long long c) {
  if (b == 1) return a;
  if (b % 2) {
    return (pow1(a, b - 1, c) * a * 1ll) % c;
  }
  return (pow1(a, b / 2, c) * pow1(a, b / 2, c) * 1ll) % c;
}
int main() {
  cin >> n;
  if (n == 1) {
    cout << "YES" << endl;
    cout << 1;
    return 0;
  }
  if (n == 2) {
    cout << "YES" << endl << 1 << endl << 2;
    return 0;
  }
  if (n == 4) {
    cout << "YES" << endl << 1 << endl << 3 << endl << 2 << endl << 4;
    return 0;
  }
  for (int k = 2; k <= sqrt(n); ++k)
    if (n % k == 0) {
      cout << "NO";
      return 0;
    }
  cout << "YES" << endl << 1 << endl << 2 << endl;
  for (int k = 3; k <= n - 1; ++k) {
    cout << (k * pow1(k - 1, n - 2, n)) % n << endl;
  }
  cout << n;
  return 0;
}
