#include <bits/stdc++.h>
using namespace std;
int n;
bool ZS(int x) {
  for (int i = 2; i <= sqrt(x); i++) {
    if (x % i == 0) return 1;
  }
  return 0;
}
int Quick_Pow(int x, int y, int z) {
  int i = x, j = y, ans = 1;
  for (; j; j >>= 1) {
    if (j & 1) ans = (long long)ans * i % z;
    i = (long long)i * i % z;
  }
  return ans;
}
int main() {
  scanf("%d", &n);
  if (ZS(n) && n != 4) {
    printf("NO");
    return 0;
  }
  printf("YES\n1\n");
  if (n == 4) {
    printf("3\n2\n4");
    return 0;
  }
  for (int i = 2; i < n; i++) {
    printf("%lld\n", (long long)i * Quick_Pow(i - 1, n - 2, n) % n);
  }
  if (n > 1) printf("%d", n);
  return 0;
}
