#include <bits/stdc++.h>
using namespace std;
long long inv[100005];
bool isprime[100005];
void crivo() {
  for (int i = 2; i < 100005; i++) isprime[i] = true;
  for (int i = 2; i * i < 100005; i++)
    if (isprime[i])
      for (int j = i * i; j < 100005; j += i) isprime[j] = false;
}
int main() {
  crivo();
  int n;
  scanf(" %d", &n);
  if (n == 1) {
    printf("YES\n");
    printf("1\n");
  } else if (n == 4) {
    printf("YES\n");
    printf("1\n");
    printf("3\n");
    printf("2\n");
    printf("4\n");
  } else if (isprime[n]) {
    printf("YES\n");
    printf("1\n");
    inv[1] = 1;
    for (int i = 2; i <= n; i++) inv[i] = (inv[n % i] * (n - n / i)) % n;
    for (int i = 2; i < n; i++) printf("%d\n", (inv[i - 1] * i) % n);
    printf("%d\n", n);
  } else {
    printf("NO\n");
  }
  return 0;
}
