#include <bits/stdc++.h>
using namespace std;
long long int n;
long long int powr(long long int a, long long int b) {
  if (b == 0) return 1;
  long long int temp = powr(a, b / 2);
  if (b % 2 == 0) {
    return (temp * temp) % n;
  } else {
    return (((temp * temp) % n) * a) % n;
  }
}
int main() {
  cin >> n;
  long long int prime = 1;
  for (long long int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      prime = 0;
      break;
    }
  }
  if (n > 4 && !prime) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
    cout << "1"
         << "\n";
    if (n == 4) {
      cout << "3\n2\n4\n";
      return 0;
    }
    for (long long int i = 2; i <= n; i++) {
      if (i == n) {
        cout << n << "\n";
        break;
      }
      long long int temp = powr(i - 1, n - 2);
      cout << (temp * i) % n << "\n";
    }
  }
}
