#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1111;
const int INF = 0x7f7f7f7f;
int cases;
bool judge(int n) {
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
int Inv(int x, int p) {
  int a = p, b = x % p, u = 0, v = 1, t;
  while (b) {
    t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  return u < 0 ? u + p : u;
}
int main() {
  int n;
  scanf("%d", &n);
  if (n > 4 && !judge(n))
    puts("NO");
  else {
    puts("YES");
    if (n == 1) {
      puts("1");
    } else if (n == 4) {
      puts("1");
      puts("3");
      puts("2");
      puts("4");
    } else {
      puts("1");
      for (int i = 2; i < n; i++) {
        printf("%lld\n", (long long)i * Inv(i - 1, n) % n);
      }
      printf("%d\n", n);
    }
  }
}
