#include <bits/stdc++.h>
using namespace std;
int n;
int binpow(int a, int k) {
  if (k == 0) return 1;
  if (k & 1) return (binpow(a, k - 1) * 1ll * a) % n;
  int t = binpow(a, k >> 1);
  return (t * 1ll * t) % n;
}
bool isPrime(int x) {
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) return false;
  }
  return true;
}
int main() {
  scanf("%d", &n);
  if (n <= 3) {
    puts("YES");
    for (int i = 1; i <= n; i++) {
      printf("%d\n", i);
    }
    return 0;
  }
  if (n == 4) {
    puts("YES");
    puts("1\n3\n2\n4");
    return 0;
  }
  if (isPrime(n)) {
    puts("YES");
    int cur = 1;
    printf("%d\n", cur);
    for (int i = 2; i < n; i++) {
      int x = (i * 1ll * binpow(cur, n - 2)) % n;
      printf("%d\n", x);
      cur = (cur * 1ll * x) % n;
    }
    printf("%d\n", n);
  } else
    puts("NO");
  return 0;
}
