#include <bits/stdc++.h>
int const MAX = 1e5 + 10;
long long inv[MAX];
int n;
bool isprime(int x) {
  if (x == 1) return false;
  if (x == 2) return true;
  if (x % 2 == 0) return false;
  for (int i = 3; i <= sqrt(n); i += 2)
    if (n % i == 0) return false;
  return true;
}
int main() {
  scanf("%d", &n);
  if (n == 4) {
    printf("YES\n1\n3\n2\n4\n");
    return 0;
  } else if (n == 1) {
    printf("YES\n1\n");
    return 0;
  } else if (!isprime(n)) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n1\n");
  inv[1] = 1;
  for (int i = 2; i < n; i++) {
    inv[i] = (n - n / i) * inv[n % i] % n;
    printf("%lld\n", ((long long)i * inv[i - 1] % n));
  }
  printf("%d\n", n);
}
