#include <bits/stdc++.h>
using namespace std;
long long powmd(long long a, long long b, long long m) {
  long long ans = 1;
  while (b > 0) {
    if (b & 1) ans = (ans * a) % m;
    a = a * a % m;
    b >>= 1;
  }
  return ans;
}
bool isprm(long long n) {
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) return 0;
  }
  return 1;
}
int32_t main() {
  long long n;
  cin >> n;
  if (n == 1) return cout << "YES\n1", 0;
  if (n == 4) return cout << "YES\n1\n3\n2\n4\n", 0;
  if (!isprm(n)) return cout << "NO", 0;
  cout << "YES\n1\n";
  for (long long i = 2; i < n; i++) {
    long long val = i * (powmd(i - 1, n - 2, n)) % n;
    cout << val << "\n";
  }
  cout << n << "\n";
  return 0;
}
