#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:256000000")
using namespace std;
long long n;
long long ans[100007];
long long POW(long long x, long long N) {
  if (N == 0) return 1;
  long long res = POW(x, N >> 1);
  res = (res * res) % n;
  if (N & 1) res = (res * x) % n;
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  if (n == 4) {
    cout << "YES" << endl;
    cout << "1 3 2 4";
    return 0;
  }
  for (int i = 2; i * i <= n; i++) {
    if (n % i) continue;
    cout << "NO";
    return 0;
  }
  ans[1] = 1;
  ans[n] = n;
  long long p = 1;
  for (int i = 2; i < n; i++) {
    ans[i] = ((p + 1) * POW(p, n - 2)) % n;
    p = p + 1;
  }
  cout << "YES" << endl;
  for (int i = 1; i <= n; i++) cout << ans[i] << endl;
  return 0;
}
