#include <bits/stdc++.h>
using namespace std;
long long po(long long a, long long b, long long mod) {
  long long ans = 1ll;
  while (b) {
    if (b & 1ll) ans = (ans * a) % mod;
    a = (a * a) % mod;
    b = b >> 1ll;
  }
  return (ans % mod);
}
bool prime(long long num) {
  for (long long i = 2; i * i <= num; i++) {
    if (num % i == 0) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  if (n == 4) {
    cout << "YES\n";
    cout << "1\n3\n2\n4" << endl;
    return 0;
  } else if (n == 1) {
    cout << "YES\n1\n" << endl;
    return 0;
  } else if (!prime(n)) {
    printf("NO\n");
    return 0;
  }
  cout << "YES\n1\n";
  for (long long i = 2; i < n; i++) {
    long long inv = po(i - 1, n - 2, n);
    long long x = (i * inv) % n;
    cout << x << endl;
  }
  cout << n << endl;
  return 0;
}
