#include <bits/stdc++.h>
using namespace std;
int BigMod(int a, int b, int c) {
  if (b == 0) return 1;
  int x = BigMod(a, b >> 1, c);
  x = (1LL * x * x) % c;
  if (b & 1) x = (1LL * x * a) % c;
  return x;
}
int isPrime(int N) {
  if (N < 2) return 0;
  for (int i = 2; i * i <= N; i++)
    if (N % i == 0) return 0;
  return 1;
}
int main() {
  int n;
  cin >> n;
  if (n == 1)
    cout << "YES\n1\n";
  else if (n == 4)
    cout << "YES\n1\n3\n2\n4\n";
  else {
    if (!isPrime(n)) {
      cout << "NO\n";
      return 0;
    }
    cout << "YES\n1\n";
    for (int i = 2; i < n; i++)
      cout << (1LL * i * BigMod(i - 1, n - 2, n)) % n << "\n";
    cout << n << "\n";
  }
  return 0;
}
