#include <bits/stdc++.h>
using namespace std;
int n, a[100005], ilog[100005];
int plog(int x, int pw) {
  int y;
  if (!pw) return 1;
  y = plog(x, pw / 2);
  if (pw % 2) return (1LL * y * y * x) % n;
  return (1LL * y * y) % n;
}
int main() {
  int i;
  cin >> n;
  if (n == 4) {
    printf("YES\n1\n3\n2\n4\n");
    return 0;
  }
  for (i = 2; i * i <= n; i++)
    if (n % i == 0) {
      printf("NO");
      return 0;
    }
  printf("YES\n1\n");
  for (i = 1; i < n; i++) ilog[i] = plog(i, n - 2);
  for (i = 2; i < n; i++) printf("%ld\n", (1LL * ilog[i - 1] * i) % n);
  if (n > 1) printf("%ld", n);
  return 0;
}
