#include <bits/stdc++.h>
using namespace std;
bool sieve[100005];
void genPrimes() {
  long long i, j;
  for (i = 2; i < 100005; i++) {
    if (sieve[i] == 0) {
      for (j = i + i; j < 100005; j += i) sieve[j] = 1;
    }
  }
}
long long ext_euclid(long long a, long long b) {
  long long r = 1, s0 = 1, s1 = 0, t0 = 0, t1 = 1, q, s, t;
  while (r) {
    r = a % b;
    q = a / b;
    a = b;
    b = r;
    s = s0 - q * s1;
    t = t0 - q * t1;
    s0 = s1;
    t0 = t1;
    s1 = s;
    t1 = t;
  }
  return s0;
}
int main() {
  genPrimes();
  int n, i;
  cin >> n;
  if (n <= 4) {
    puts("YES");
    if (n == 4) {
      cout << 1 << ' ' << 3 << ' ' << 2 << ' ' << 4 << endl;
    } else {
      for (i = 1; i <= n; i++) {
        cout << i << endl;
      }
    }
    return 0;
  }
  if (sieve[n] == 1) {
    puts("NO");
    return 0;
  }
  puts("YES");
  long long p, q;
  cout << 1 << endl;
  for (i = 2; i < n; i++) {
    q = ext_euclid(i - 1, n);
    p = ((q * i) % n + n) % n;
    cout << p << endl;
  }
  cout << n << endl;
}
