#include <bits/stdc++.h>
using namespace std;
string s;
int mark[1000006];
bitset<1000006> prime;
void isprime() {
  prime.set();
  for (int i = 2; i < 1000006; i++) {
    if (prime[i]) {
      for (int j = i + i; j < 1000006; j += i) prime[j] = false;
    }
  }
}
int main(void) {
  int n, m = 0;
  scanf("%d", &n);
  if (n == 4) {
    printf("YES\n");
    return 0 * printf("1\n3\n2\n4\n");
  }
  isprime();
  if (!prime[n]) {
    return 0 * puts("NO");
  }
  mark[1] = 1;
  for (int i = 2; i <= n; i++) {
    mark[i] = (long long)(n - n / i) * mark[n % i] % n;
  }
  mark[n] = n;
  puts("YES");
  printf("1\n");
  for (int i = 2; i < n; i++) {
    printf("%d\n", (int)((long long)i * mark[i - 1] % n));
  }
  if (n != 1) printf("%d\n", n);
  return 0;
}
