#include <bits/stdc++.h>
long long n;
long long check(long long x) {
  for (long long i = 2; i * i <= x; i++)
    if (x % i == 0) return 1;
  return 0;
}
long long exgcd(long long a, long long b, long long &x, long long &y) {
  long long g = a;
  if (b == 0)
    x = 1, y = 0;
  else
    g = exgcd(b, a % b, y, x), y -= (a / b) * x;
  return g;
}
int main() {
  scanf("%lld", &n);
  if (n == 1) return !printf("YES\n1\n");
  if (n == 4) return !printf("YES\n1 3 2 4\n");
  if (check(n)) return !printf("NO\n");
  printf("YES\n1\n");
  for (register long long i = 2; i <= n - 1; ++i) {
    long long x, y;
    exgcd(i - 1, n, x, y);
    printf("%lld\n", ((x * i) % n + n) % n);
  }
  printf("%lld\n", n);
  return 0;
}
