#include <bits/stdc++.h>
using namespace std;
template <typename T>
void print(T t) {
  cout << t << endl;
}
template <typename T, typename... Args>
void print(T t, Args... args) {
  cout << t << " ";
  print(args...);
}
long long n;
long long ans[100005];
long long inv(long long x) {
  long long r, y;
  for (r = 1, y = n - 2; y > 0; x = (x * x) % n, y /= 2)
    if (y % 2 == 1) r = r * x % n;
  return r;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  if (n == 1) {
    print("YES");
    print(1);
    return 0;
  }
  if (n == 4) {
    print("YES");
    print("1\n3\n2\n4\n");
    return 0;
  }
  ans[1] = 1;
  ans[n] = n;
  set<long long> s;
  for (long long i = 2; i < n; i++) s.insert(i);
  for (long long i = 2; i < n; i++) {
    long long val = (i * inv(i - 1)) % n;
    if (s.find(val) == s.end()) {
      print("NO");
      return 0;
    }
    s.erase(val);
    ans[i] = val;
  }
  print("YES");
  for (long long i = 1; i <= n; i++) print(ans[i]);
}
