#include <bits/stdc++.h>
using namespace std;
int n, N, x;
int ans[1000000];
bool used[1000000];
int gcd(int a, int b) {
  while (a > 0 && b > 0) {
    if (a > b)
      a %= b;
    else
      b %= a;
  }
  return (a + b);
}
int st(int x, int m) {
  if (m == 0) return 1;
  if (m % 2 == 1) {
    int t = 1LL * st(x, m - 1) * x % n;
    return t;
  }
  int t;
  t = st(x, m / 2);
  t = 1LL * t * t % n;
  return t;
}
int main() {
  scanf("%d", &n);
  if (n == 4) {
    cout << "YES" << endl;
    cout << 1 << endl << 3 << endl << 2 << endl << 4 << endl;
    return 0;
  }
  ans[0] = 1;
  used[1] = true;
  for (int i = 1; i < n - 1; ++i) {
    int b, a, g;
    b = (i + 1) % n;
    a = i;
    g = gcd(a, n);
    if (b % g != 0) {
      puts("NO");
      return 0;
    }
    a /= g;
    b /= g;
    N = n / g;
    x = 1LL * b * st(a, N - 2) % N;
    for (int j = 0; j < g; ++j) {
      int xn = 1LL * (x + 1LL * j * N % n) % n;
      if (xn > 0 && !used[xn]) {
        used[xn] = true;
        ans[i] = xn;
        break;
      }
    }
  }
  ans[n - 1] = n;
  puts("YES");
  for (int i = 0; i < n; ++i) {
    printf("%d\n", ans[i]);
  }
  return 0;
}
