#include <bits/stdc++.h>
using namespace std;
bool is_prime(int n) {
  if (n == 2) return 1;
  if (n % 2 == 0) return 0;
  for (int i = 3; i * i <= n; i += 2)
    if (n % i == 0) return 0;
  return 1;
}
inline long long int inv(int a, int mo) {
  a %= mo;
  if (a < 0) a += mo;
  int b = mo, u = 0, v = 1, t;
  while (a) {
    t = b / a;
    b -= t * a;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  assert(b == 1);
  if (u < 0) u += mo;
  return u;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, b;
  cin >> n;
  if (n == 1)
    cout << "YES\n1\n";
  else if (n == 4)
    cout << "YES\n1\n3\n2\n4\n";
  else if (is_prime(n)) {
    cout << "YES\n1\n";
    for (long long int i = 2; i < n; i++) {
      b = (i * inv(i - 1, n)) % n;
      cout << b << "\n";
    }
    cout << n << endl;
  } else
    cout << "NO\n";
}
