#include <bits/stdc++.h>
using namespace std;
long long n, a[200001];
long long pd(long long x) {
  int i;
  for (i = 2; i * i <= x; i++)
    if (x % i == 0) return 1;
  return 0;
}
long long ksm(long long x, long long y) {
  long long now = 1;
  while (y) {
    if (y & 1) now = now * x % n;
    x = x * x % n;
    y /= 2;
  }
  return now;
}
int main() {
  long long i;
  scanf("%d", &n);
  if (n == 4) {
    puts("YES");
    printf("1\n3\n2\n4\n");
    return 0;
  }
  if (n > 4 && pd(n)) return puts("NO"), 0;
  a[n] = n;
  a[1] = 1;
  for (i = 2; i < n; i++) a[i] = i * ksm(i - 1, n - 2) % n;
  puts("YES");
  for (i = 1; i <= n; i++) printf("%lld\n", a[i]);
}
