#include <bits/stdc++.h>
using namespace std;
long long n, i, x, y, z;
long long exgcd(long long a, long long b, long long &x, long long &y) {
  long long tmp, t;
  if (b == 0) {
    x = 1;
    y = 1;
    return a;
  }
  tmp = exgcd(b, a % b, x, y);
  t = x;
  x = y;
  y = t - a / b * y;
  return tmp;
}
int main() {
  scanf("%lld", &n);
  if (n <= 3) {
    printf("YES\n");
    for (i = 1; i <= n; i++) printf("%lld\n", i);
    return 0;
  }
  if (n == 4) {
    printf("YES\n1\n3\n2\n4\n");
    return 0;
  }
  for (i = 2; i <= n - 1; i++)
    if (n % i == 0) {
      printf("NO");
      return 0;
    }
  printf("YES\n1\n");
  for (i = 2; i <= n - 1; i++) {
    z = exgcd(i - 1, n, x, y);
    x = x * i;
    x = (x % n + n) % n;
    printf("%lld\n", x);
  }
  printf("%lld\n", n);
}
