#include <bits/stdc++.h>
using namespace std;
template <class T>
void out(T A[], int n) {
  for (int i = 0; i < n; i++) cout << A[i] << " ";
  cout << endl;
}
template <class T>
void out(vector<T> A, int n = -1) {
  if (n == -1) n = A.size();
  for (int i = 0; i < n; i++) cout << A[i] << " ";
  cout << endl;
}
const int N = 100005;
const int M = 9999999;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
const double EPS = 1e-11;
const int CHILD_NUM = 26;
const int MOD = 1000000007;
long long n;
int inv[N];
int is_prime(long long x) {
  for (int i = 2; i * i <= x; ++i)
    if (x % i == 0) return 0;
  return 1;
}
int init() {
  inv[1] = 1;
  for (int i = 2; i < n; ++i) inv[i] = (n - (n / i) * inv[n % i] % n) % n;
  return 0;
}
int main() {
  scanf("%I64d", &n);
  if (!is_prime(n) && n != 1 && n != 4) {
    printf("NO\n");
    return 0;
  }
  if (n == 4) {
    printf("YES\n");
    printf("1\n3\n2\n4\n");
    return 0;
  }
  init();
  printf("YES\n1\n");
  for (int i = 2; i < n; ++i) {
    printf("%I64d\n", (long long)i * inv[i - 1] % n);
  }
  if (n != 1) {
    printf("%d\n", n);
  }
  return 0;
}
