#include <bits/stdc++.h>
using namespace std;
int n, ans[100005];
bool used[100005];
int p(int n) {
  for (int i = 2;; i++) {
    memset(used, 0, sizeof(used));
    int res = 1;
    bool ok = 0;
    for (int j = 1; j < n; j++) {
      res = res * i % n;
      if (used[res]) {
        ok = 1;
        break;
      }
      used[res] = 1;
    }
    if (ok)
      continue;
    else
      return i;
  }
}
bool is(int n) {
  int a = (int)sqrt(n + 0.5);
  for (int i = 2; i <= a; i++)
    if (n % i == 0) return false;
  return true;
}
int main() {
  scanf("%d", &n);
  if (n == 1) {
    cout << "YES\n1";
    return 0;
  }
  if (n == 2) {
    cout << "YES\n1\n2";
    return 0;
  }
  if (n == 3) {
    cout << "YES\n1\n2\n3";
    return 0;
  }
  if (n == 4) {
    cout << "YES\n1\n3\n2\n4";
    return 0;
  }
  if (n > 4 && !is(n)) {
    cout << "NO";
    return 0;
  }
  cout << "YES\n";
  int q = p(n);
  ans[0] = 1;
  for (int i = 1; i < n; i++) ans[i] = ans[i - 1] * q % n;
  for (int i = 0; i <= n / 2; i += 2) swap(ans[i], ans[n - i - 1]);
  ans[n - 1] = n;
  int tot = 1;
  for (int i = 0; i < n; i++) {
    cout << ans[i] << endl;
  }
  return 0;
}
