#include <bits/stdc++.h>
using namespace std;
long long p;
long long fastpow(long long a, int b) {
  if (b == 1) return a;
  if (b == 0) return 1;
  if (b % 2)
    return ((fastpow((a * a) % p, (b - 1) / 2) % p) * a) % p;
  else
    return fastpow((a * a) % p, b / 2) % p;
}
int main() {
  int n;
  cin >> n;
  if (n <= 4) {
    if (n == 1) {
      cout << "YES\n1";
      return 0;
    }
    if (n == 2) {
      cout << "YES\n1\n2";
      return 0;
    }
    if (n == 3) {
      cout << "YES\n1\n2\n3";
      return 0;
    }
    if (n == 4) {
      cout << "YES\n1\n3\n2\n4";
      return 0;
    }
  }
  for (int i = 2; i < n; i++)
    if (n % i == 0) {
      cout << "NO";
      return 0;
    }
  cout << "YES\n";
  vector<long long> result;
  result.push_back(1);
  p = n;
  for (int i = 2; i < n; i++)
    result.push_back(fastpow((i - 1), (n - 2)) * i % p);
  result.push_back(n);
  for (auto it = result.begin(); it != result.end(); it++) cout << *it << endl;
  return 0;
}
