#include <bits/stdc++.h>
using namespace std;
signed long long int pow(signed long long int base,
                         signed long long int exponent,
                         signed long long int modulus) {
  signed long long int result = 1;
  while (exponent > 0) {
    if (exponent % 2 == 1) result = (result * base) % modulus;
    exponent = exponent >> 1;
    base = (base * base) % modulus;
  }
  return result;
}
int main() {
  int N;
  cin >> N;
  if (N == 1) {
    cout << "YES\n" << 1;
    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\n1\n";
  for (int i = 2; i < N; ++i) {
    cout << (i * pow(i - 1, N - 2, N)) % N << endl;
  }
  cout << N;
}
