#include <bits/stdc++.h>
using namespace std;
int n;
bool check(int x) {
  for (int i = 2; i * i <= x; ++i)
    if (!(x % i)) return 0;
  return 1;
}
long long power(long long x, int k) {
  long long ans = 1;
  while (k) {
    if (k & 1) ans = (ans * x) % n;
    k >>= 1;
    x = (x * x) % n;
  }
  return ans;
}
int main() {
  scanf("%d", &n);
  if (check(n)) {
    printf("YES\n1\n");
    for (long long i = 2; i < n; ++i)
      printf("%lld\n", i * power(i - 1, n - 2) % n);
    if (n != 1) printf("%d\n", n);
  } else {
    if (n == 4)
      printf("YES\n1\n3\n2\n4\n");
    else
      printf("NO\n");
  }
  return 0;
}
