#include <bits/stdc++.h>
using namespace std;
long long expMod(long long base, long long ex, long long mod) {
  if (ex == 0) return 1;
  long long temp = expMod(base, ex / 2, mod);
  temp = (temp * temp) % mod;
  if (ex % 2) temp = (temp * base) % mod;
  return temp;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  if (n != 4)
    for (int(i) = (2); (i) < (n + 1); (i)++) {
      if (i * i > n) break;
      if (n % i == 0) {
        cout << "NO\n";
        return 0;
      }
    }
  cout << "YES\n";
  if (n == 1) {
    cout << 1 << "\n";
    return 0;
  }
  if (n == 4) {
    cout << "1 3 2 4\n";
    return 0;
  }
  int a[n];
  a[0] = 1;
  a[n - 1] = n;
  for (int(i) = (1); (i) < (n - 1); (i)++)
    a[i] = (i + 1) * expMod(i, n - 2, n) % n;
  for (int(i) = 0; (i) < (n); (i)++) cout << a[i] << " ";
  cout << "\n";
  return 0;
}
