#include <bits/stdc++.h>
using namespace std;
int n, c;
long long P(int a, int b) {
  if (b == 0) return 1;
  if (b & 1) return P(a, b - 1) * a % n;
  long long p = P(a, b / 2);
  return p * p % n;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i)
    if (n % i == 0) ++c;
  if (n == 1) return cout << "YES\n1" << endl, 0;
  if (n == 4) return cout << "YES\n1\n3\n2\n4" << endl, 0;
  if (c > 2) return cout << "NO" << endl, 0;
  cout << "YES\n1\n";
  for (int i = 2; i < n; ++i) {
    cout << P(i - 1, n - 2) * i % n << "\n";
  }
  cout << n << endl;
  return 0;
}
