#include <bits/stdc++.h>
using namespace std;
int n;
int pow(int x, int t, int m) {
  if (!t) return 1;
  if (t % 2) return ((long long)pow(x, t - 1, m) * (long long)x) % m;
  int p = pow(x, t / 2, m);
  return ((long long)p * (long long)p) % m;
}
int main() {
  int i;
  scanf("%d", &n);
  if (n == 1) {
    printf("YES\n1\n");
    return 0;
  }
  if (n == 4) {
    printf("YES\n1 3 2 4\n");
    return 0;
  }
  for (i = 2; i * i <= n; i++)
    if (!(n % i)) break;
  if (i * i < n) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  printf("1\n");
  for (i = 2; i < n; i++)
    printf("%d\n", ((long long)i * pow(i - 1, n - 2, n)) % n);
  printf("%d\n", n);
  return 0;
}
