#include <bits/stdc++.h>
using namespace std;
long long ans[100005], mod;
long long pow(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return res;
}
int main() {
  int n;
  scanf("%d", &n);
  if (n == 1)
    printf("YES\n1\n");
  else if (n == 2)
    printf("YES\n1\n2\n");
  else if (n == 3)
    printf("YES\n1\n2\n3\n");
  else if (n == 4)
    printf("YES\n1\n3\n2\n4\n");
  else if (n == 5)
    printf("YES\n1\n2\n4\n3\n5\n");
  else {
    for (long long i = 2; i * i <= n; i++)
      if (n % i == 0) {
        printf("NO\n");
        return 0;
      }
    ans[1] = 1;
    mod = n;
    for (long long i = 2; i <= n; i++) {
      ans[i] = i * pow(i - 1, n - 2);
    }
    printf("YES\n");
    for (int i = 1; i < n; i++) printf("%d\n", ans[i] % mod);
    printf("%d\n", n);
  }
  return 0;
}
