#include <bits/stdc++.h>
using namespace std;
int GCD(int a, int b) {
  if (b == 0) return a;
  return (a % b == 0 ? b : GCD(b, a % b));
}
long long int POW(long long int base, long long int exp, long long mod) {
  long long int val;
  val = 1;
  while (exp > 0) {
    if (exp % 2 == 1) {
      val = (val * base) % mod;
    }
    base = (base * base) % mod;
    exp = exp / 2;
  }
  return val;
}
bool is_prime(int n) {
  int i;
  for (i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
int main() {
  int n, i, num;
  long long prev;
  int arr[1000] = {};
  scanf("%d", &n);
  if (n == 1) {
    printf("YES\n");
    printf("1\n");
    return 0;
  }
  if (n == 4) {
    printf("YES\n");
    printf("1\n3\n2\n4\n");
    return 0;
  }
  if (is_prime(n) == false) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  printf("1\n");
  arr[0] = 1;
  for (i = 2; i < n; i++) {
    prev = i - 1;
    prev = i * 1LL * POW(prev, n - 2, n);
    prev = prev % n;
    num = (int)prev;
    printf("%d\n", num);
  }
  printf("%d\n", n);
  return 0;
}
