#include <bits/stdc++.h>
using namespace std;
int power(int x, int p, int mod) {
  int res = 1;
  while (p > 0) {
    if (p % 2 == 1) {
      p--;
      res = (1ll * res * x) % mod;
    } else {
      x = (1ll * x * x) % mod;
      p /= 2;
    }
  }
  return res;
}
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << "YES\n"
         << "1";
    return 0;
  } else if (n == 4) {
    cout << "YES\n"
         << "1\n3\n2\n4";
    return 0;
  }
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES\n"
       << "1\n";
  for (int i = 2; i < n; i++) {
    int x = (1ll * power(i - 1, n - 2, n) * i) % n;
    cout << x << "\n";
  }
  cout << n;
  return 0;
}
