#include <bits/stdc++.h>
using namespace std;
long long mmi(long long base, long long power, long long mod) {
  if (power == 0) return 1;
  long long half = mmi(base, power / 2, mod);
  if (power % 2) return ((half * half) % mod * base) % mod;
  return (half * half) % mod;
}
bool is_prime(long long n) {
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
int main() {
  long long n;
  scanf("%I64d", &n);
  if (n == 1) {
    printf("YES\n1");
    return 0;
  }
  if (n == 2) {
    printf("YES\n1\n2");
    return 0;
  }
  if (n == 4) {
    printf("YES\n1\n3\n2\n4");
    return 0;
  }
  if (is_prime(n) == false) {
    printf("NO");
    return 0;
  }
  long long a[n + 1];
  a[1] = 1, a[n] = n, a[n - 1] = 2;
  for (long long i = n - 1; i >= 3; i--)
    a[i - 1] = mmi(n - i + 1, n - 2, n) + 1;
  printf("YES\n");
  for (long long i = 1; i <= n; i++) printf("%I64d\n", a[i]);
  return 0;
}
