#include <bits/stdc++.h>
using namespace std;
int n;
const int prime[8] = {2, 3, 5, 7, 11, 13, 17, 19};
long long mul(long long x, long long y, long long mo) {
  long long ret = 1;
  while (y) {
    if (y % 2 == 1) ret = ret * x % mo;
    x = x * x % mo;
    y /= 2;
  }
  return ret;
}
bool is_prime(int n) {
  for (int i = 0; i <= 7; i++) {
    if (n == prime[i]) return 1;
    if (mul(prime[i], n - 1, n) != 1) return 0;
  }
  return 1;
}
int main() {
  scanf("%d", &n);
  if (n == 1) {
    puts("YES");
    puts("1");
    return 0;
  }
  if (n == 4) {
    puts("YES");
    puts("1");
    puts("3");
    puts("2");
    puts("4");
    return 0;
  }
  if (!is_prime(n)) {
    puts("NO");
    return 0;
  }
  puts("YES");
  puts("1");
  for (int i = 2; i <= n; i++) {
    long long now = i * mul(i - 1, n - 2, n) % n;
    if (now == 0) now = n;
    printf("%I64d\n", now);
  }
  return 0;
}
