#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  long long ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
int main() {
  long long n;
  scanf("%lld", &n);
  if (n == 4) {
    printf("YES\n1\n3\n2\n4\n");
    return 0;
  }
  for (int i = 2; i < n; i++) {
    if (n % i == 0) {
      printf("NO");
      return 0;
    }
  }
  printf("YES\n1\n");
  for (long long i = 2; i < n; i++) {
    long long x = modinverse(i, n);
    x = x * (i - 1);
    x = x % n;
    printf("%lld\n", x);
  }
  if (n > 1) printf("%lld", n);
}
