#include <bits/stdc++.h>
using namespace std;
int n;
bool isPrime(int x) {
  for (int i = 2; i * i <= x; ++i)
    if (x % i == 0) return false;
  return true;
}
int pow(int a, int b) {
  if (b == 0) return 1;
  int t = pow(a, b / 2);
  t = (long long)t * t % n;
  if (b % 2) t = (long long)t * a % n;
  return t;
}
int main() {
  cin >> n;
  if (n == 1)
    cout << "YES\n1" << endl;
  else if (n == 2)
    cout << "YES\n1\n2" << endl;
  else if (n == 4)
    cout << "YES\n1\n3\n2\n4" << endl;
  else {
    if (!isPrime(n)) {
      cout << "NO" << endl;
      return 0;
    }
    int g = 2;
    for (;; ++g) {
      bool flag = true;
      for (int i = 1; i < n - 1; ++i)
        if ((n - 1) % i == 0 && pow(g, i) == 1) {
          flag = false;
          break;
        }
      if (flag) break;
    }
    cout << "YES" << endl;
    for (int i = 0; i != n - 1; ++i)
      if (i % 2 == 0)
        cout << pow(g, n - 1 - i) << endl;
      else
        cout << pow(g, i) << endl;
    cout << n << endl;
  }
  return 0;
}
