#include <bits/stdc++.h>
using namespace std;
long long const mod = 1e9 + 7;
long long power(long long x, long long y, long long mod = 2e18) {
  long long ans = 1;
  x %= mod;
  while (y) {
    if (y & 1) ans = (x * ans) % mod;
    x = (x * x) % mod;
    y >>= 1;
  }
  return ans;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n;
  if (n == 4) {
    cout << ("YES\n1\n3\n2\n4");
    return 0;
  }
  for (long long i = 2; i < n; i++)
    if (n % i == 0) {
      printf("NO");
      return 0;
    }
  cout << "YES\n1\n";
  for (long long i = 2; i < n; i++) {
    cout << i * power(i - 1, n - 2, n) % n << endl;
  }
  if (n != 1) cout << n;
  return 0;
}
