#include <bits/stdc++.h>
#pragma GCC optimize("-O3")
using namespace std;
const double PI = acos(-1);
long long gcd() { return 0ll; }
template <typename T, typename... Args>
T gcd(T a, Args... args) {
  return __gcd(a, (__typeof(a))gcd(args...));
}
vector<bool> prime(100001, 1);
void seive() {
  for (int i = 2; i * i <= 100001; i++) {
    if (prime[i]) {
      for (int j = i * 2; j < 100001; j += i) prime[j] = 0;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  {
    seive();
    int n;
    cin >> n;
    if (n == 1 || n == 4) cout << "YES\n";
    if (n == 1) {
      cout << "1\n";
      return 0;
    }
    if (n == 4) {
      cout << "1\n3\n2\n4\n";
      return 0;
    }
    if (!prime[n]) {
      cout << "NO\n";
      return 0;
    }
    int a[n], inv[n];
    inv[1] = 1;
    for (__typeof(n) i = (2) - ((2) > (n)); i != (n) - ((2) > (n));
         i += 1 - 2 * ((2) > (n)))
      inv[i] = (n - (1ll * (n / i) * inv[n % i]) % n) % n;
    a[0] = 1;
    for (__typeof(n) i = (1) - ((1) > (n)); i != (n) - ((1) > (n));
         i += 1 - 2 * ((1) > (n)))
      a[i] = (1ll * (i + 1) * inv[i]) % n;
    a[n - 1] = n;
    cout << "YES\n";
    for (auto it : a) cout << it << "\n";
  }
  return 0;
}
