#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e6 + 13;
const long long INF = 2e18;
long long mod = -1;
bool isprime(long long n) {
  for (long long i = 2; i * i <= n; ++i) {
    if (n % i == 0) return 0;
  }
  return 1;
}
long long bp(long long a, long long n) {
  if (n == 0) return 1;
  if (n & 1) return (bp(a, n - 1) * a) % mod;
  long long x = bp(a, n / 2);
  return (x * x) % mod;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long> a(n);
  mod = n;
  if (n == 1) {
    cout << "YES\n";
    cout << 1 << "\n";
    return 0;
  }
  if (n == 2) {
    cout << "YES\n1\n2\n";
    return 0;
  }
  if (n == 3) {
    cout << "YES\n1\n2\n3\n";
    return 0;
  }
  if (n == 4) {
    cout << "YES\n";
    cout << "1 3 2 4\n";
    return 0;
  }
  if (!isprime(n)) {
    cout << "NO\n";
    return 0;
  }
  cout << "YES\n";
  cout << "1 \n";
  a[0] = 1;
  a[n - 1] = n;
  for (long long i = 2; i <= n - 1; ++i) {
    a[i - 1] = (i * bp(i - 1, n - 2)) % n;
  }
  for (long long i = 1; i < n; ++i) cout << a[i] << "\n";
  return 0;
}
