#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int n;
int arr[MAXN];
long long fastPow(long long x, long long p) {
  long long answer = 1, current = x;
  while (p != 0) {
    if (p % 2 != 0) {
      answer = (answer * current) % n;
    }
    p /= 2;
    current = (current * current) % n;
  }
  return answer;
}
bool checkPrime(int x) {
  for (int d = 2; d * d <= x; d++) {
    if (x % d == 0) return false;
  }
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  if (n == 1) {
    cout << "YES" << '\n';
    cout << "1" << '\n';
    return 0;
  }
  if (n == 4) {
    cout << "YES" << '\n';
    cout << "1 3 2 4" << '\n';
    return 0;
  }
  if (checkPrime(n) == false) {
    cout << "NO" << '\n';
    return 0;
  }
  arr[1] = 1;
  for (long long i = 2; i < n; i++) {
    arr[i] = (fastPow(i - 1, n - 2) * i) % n;
  }
  arr[n] = n;
  cout << "YES" << '\n';
  for (int i = 1; i <= n; i++) {
    cout << arr[i] << '\n';
  }
}
