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