#include <bits/stdc++.h>
using namespace std;
int M;
int gcd(int x, int y) { return x ? gcd(y % x, x) : y; }
long long bigmod(long long a, long long b) {
  if (b == 0) return 1 % M;
  long long x = bigmod(a, b / 2);
  x = (x * x) % M;
  if (b % 2 == 1) x = (x * a);
  return x % M;
}
long long mul_inv(long long a, long long b) {
  long long b0 = b, t, q;
  long long x0 = 0, x1 = 1;
  if (b == 1) return 1;
  while (a > 1) {
    q = a / b;
    t = b, b = a % b, a = t;
    t = x0, x0 = x1 - q * x0, x1 = t;
  }
  if (x1 < 0) x1 += b0;
  return x1;
}
long long mod_mul(long long a, long long b) { return ((a % M) * (b % M)) % M; }
long long mod_div(long long a, long long b) {
  return mod_mul(a, mul_inv(b, M));
}
long long mod_plus(long long a, long long b) { return (a + b) % M; }
vector<int> answer;
int main() {
  int i, n;
  cin >> n;
  if (n == 1) {
    printf("YES\n1\n");
    return 0;
  }
  if (n == 4) {
    printf("YES\n1\n3\n2\n4\n");
    return 0;
  }
  for (i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      printf("NO\n");
      return 0;
    }
  }
  M = n;
  long long tmp = 1;
  for (i = 1; i < n; i++) tmp = mod_mul(tmp, i);
  answer.push_back(n);
  for (i = n - 2; i > 0; i--) {
    answer.push_back(mod_div(tmp, i));
    tmp = mod_div(tmp, answer[answer.size() - 1]);
  }
  answer.push_back(1);
  printf("YES\n");
  for (i = answer.size() - 1; i >= 0; i--) printf("%d\n", answer[i]);
  return 0;
}
