#include <bits/stdc++.h>
using namespace std;
int n;
long long _pow(long long a, int b) {
  if (b == 0) return 1;
  long long ans = _pow(a, b / 2);
  ans = (ans * ans) % n;
  if (b % 2) ans = (ans * a) % n;
  return ans;
}
bool is_prime(int a) {
  for (int i = 2; i * i <= a; i++)
    if (a % i == 0) return 0;
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  if (n == 1) {
    cout << "YES\n1";
    return 0;
  }
  if (n == 4) {
    cout << "YES\n1\n3\n2\n4";
    return 0;
  }
  if (!is_prime(n)) {
    cout << "NO";
    return 0;
  }
  cout << "YES\n1\n";
  for (int i = 1; i < n - 1; i++) {
    cout << ((long long)(i + 1) * _pow(i, n - 2)) % n << "\n";
  }
  cout << n;
  return 0;
}
