#include <bits/stdc++.h>
using namespace std;
const int maxn = 100003;
int inv[maxn], n;
int mul(long long x, int y) { return x * y % n; }
int Div(int x, int y) { return mul(x, inv[y]); }
bool isprime(int x) {
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) return 0;
  }
  return 1;
}
int main() {
  scanf("%d", &n);
  if (n == 4) {
    printf("YES\n1\n3\n2\n4\n");
    return 0;
  }
  if (!isprime(n)) {
    printf("NO\n");
    return 0;
  }
  inv[1] = 1;
  for (int i = 2; i <= n; i++) inv[i] = mul(n - n / i, inv[n % i]);
  printf("YES\n1\n");
  for (int i = 2; i < n; i++) printf("%d\n", Div(i, i - 1));
  if (n > 1) printf("%d\n", n);
  return 0;
}
