#include <bits/stdc++.h>
using namespace std;
int n;
int binpow(int a, int b) {
  if (!b) {
    return 1;
  }
  if (b & 1) {
    return binpow(a, b - 1) * 1ll * a % n;
  } else {
    int tmp = binpow(a, b >> 1);
    return (tmp * 1ll * tmp) % n;
  }
}
bool prime(int x) {
  if (x == 2) {
    return 1;
  }
  if (x % 2 == 0 || x == 1) {
    return 0;
  }
  for (int i = 3; i * 1ll * i <= x; i += 2) {
    if (x % i == 0) {
      return 0;
    }
  }
  return 1;
}
inline void solve() {
  cin >> n;
  if (n == 1 || n == 4 || prime(n)) {
    cout << "YES\n";
    if (n == 1) {
      cout << 1 << endl;
    } else if (n == 4) {
      cout << 1 << endl << 3 << endl << 2 << endl << 4 << endl;
    } else {
      cout << 1 << endl;
      for (int i = 1; i < n - 1; ++i) {
        cout << (i + 1) * 1ll * binpow(i, n - 2) % n << endl;
      }
      cout << n << endl;
    }
  } else {
    cout << "NO";
  }
}
int main() {
  solve();
  return 0;
}
