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