#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC optimize("no-stack-protector,fast-math")
using namespace std;
const long long N = 2e5 + 100, OO = 1e9 + 7, T = 1e6 + 10, M = 1e9 + 7,
                P = 6151, SQ = 280, lg = 20;
long long n;
long long pw(long long x, long long y) {
  if (y == 0) return 1;
  long long cnt = pw(x, y / 2);
  cnt = (cnt * cnt) % n;
  cnt = (cnt * (y % 2 == 1 ? x : 1)) % n;
  return cnt;
}
int32_t main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n;
  if (n == 1) return cout << "YES\n1", 0;
  if (n == 4) return cout << "YES\n1\n3\n2\n4\n", 0;
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return cout << "NO", 0;
  cout << "YES\n";
  long long zr = 1;
  for (long long i = 1; i < n; i++) {
    long long cnt = i * pw(zr, n - 2) % n;
    cout << cnt << "\n";
    zr = (zr * cnt) % n;
  }
  cout << n << "\n";
  return 0;
}
