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