#include <bits/stdc++.h>
using namespace std;
int n;
int ksm(int x, int t, int y = 1) {
  while (t) {
    if (t & 1) y = 1ll * y * x % n;
    x = 1ll * x * x % n;
    t >>= 1;
  }
  return y;
}
int main() {
  cin >> n;
  if (n <= 4) {
    if (n == 1) cout << "YES\n1";
    if (n == 2) cout << "YES\n1\n2";
    if (n == 3) cout << "YES\n1\n2\n3";
    if (n == 4) cout << "YES\n1\n3\n2\n4";
    return 0;
  }
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) {
      cout << "NO\n";
      return 0;
    }
  cout << "YES\n1\n";
  for (int i = 2; i < n; i++) {
    cout << 1ll * i * ksm(i - 1, n - 2) % n << '\n';
  }
  cout << n << '\n';
}
