#include <bits/stdc++.h>
using namespace std;
int n;
long long modpow(long long b, int e) {
  long long ret = 1;
  while (e) {
    if (e & 1) ret = ret * b % n;
    b = b * b % n;
    e >>= 1;
  }
  return ret;
}
long long inv(int v) { return modpow(v, n - 2); }
int main() {
  scanf("%d", &n);
  if (n < 6) {
    puts("YES");
    int vet[n], ac[n];
    for (int(i) = (0); (i) < (n); (i)++) vet[i] = i + 1;
    do {
      ac[0] = vet[0] % n;
      for (int(i) = (1); (i) < (n); (i)++) ac[i] = vet[i] * ac[i - 1] % n;
      int ok = 1;
      for (int(i) = (0); (i) < (n); (i)++)
        if (ok)
          for (int(j) = (0); (j) < (i); (j)++)
            if (ac[i] == ac[j]) {
              ok = 0;
              break;
            }
      if (ok) {
        for (int(i) = (0); (i) < (n); (i)++) printf("%d\n", vet[i]);
        return 0;
      }
    } while (next_permutation(vet + 1, vet + n - 1));
    assert(0);
  }
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) {
      puts("NO");
      return 0;
    }
  puts("YES");
  long long ult = 1;
  for (int(i) = (1); (i) < (n); (i)++) {
    int prox = inv(ult) * i % n;
    printf("%d\n", prox);
    ult = ult * prox % n;
  }
  printf("%d\n", n);
}
