#include <bits/stdc++.h>
int x4[4] = {0, 0, -1, 1};
int y4[4] = {-1, 1, 0, 0};
int x8[8] = {-1, -1, -1, 0, 0, 1, 1, 1};
int y8[8] = {-1, 0, 1, -1, 1, -1, 0, 1};
int xhorse[8] = {1, 2, 1, 2, -1, -2, -1, -2};
int yhorse[8] = {2, 1, -2, -1, 2, 1, -2, -1};
using namespace std;
long long extended_euclid(long long a, long long b, long long &x,
                          long long &y) {
  long long xx = y = 0;
  long long yy = x = 1;
  while (b) {
    long long q = a / b;
    long long t = b;
    b = a % b;
    a = t;
    t = xx;
    xx = x - q * xx;
    x = t;
    t = yy;
    yy = y - q * yy;
    y = t;
  }
  return a;
}
long long mod(long long a, long long b) { return ((a % b) + b) % b; }
vector<long long> modular_linear_equation_solver(long long a, long long b,
                                                 long long n) {
  long long x, y;
  vector<long long> solutions;
  long long d = extended_euclid(a, n, x, y);
  if (!(b % d)) {
    x = mod(x * (b / d), n);
    for (long long i = 0; i < d; i++)
      solutions.push_back(mod(x + i * (n / d), n));
  }
  return solutions;
}
bool vis[100005];
int main() {
  long long n;
  scanf("%I64d", &n);
  if (n == 1) {
    printf("YES\n1\n");
    return 0;
  }
  if (n == 4) {
    printf("YES\n1 3 2 4\n");
    return 0;
  }
  vis[1] = vis[n] = true;
  for (long long i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  printf("1\n");
  long long now = 1;
  for (long long i = 1; i <= n - 1; i++) {
    vector<long long> v = modular_linear_equation_solver(now, i, n);
    for (long long j = 0; j < v.size(); j++) {
      if (!vis[v[j]]) {
        vis[v[j]] = true;
        printf("%I64d\n", v[j]);
        now = ((long long)now * v[j]) % n;
        break;
      }
    }
  }
  printf("%I64d\n", n);
  return 0;
}
