#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 30;
int n;
long long a[maxn];
bool judge(int x) {
  if (x == 1) return false;
  if (x == 2) return true;
  if (x % 2 == 0) return false;
  for (int i = 3; i <= sqrt(n) + 1; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
int main() {
  scanf("%d", &n);
  if (n == 4)
    printf("YES\n1\n3\n2\n4\n");
  else if (n == 1)
    printf("YES\n1\n");
  else if (!judge(n)) {
    printf("NO\n");
  } else {
    printf("YES\n");
    printf("1\n");
    a[1] = 1;
    for (int i = 2; i < n; ++i) {
      a[i] = (n - n / i) * a[n % i] % n;
      printf("%I64d\n", (long long)i * a[i - 1] % n);
    }
    printf("%d\n", n);
  }
  return 0;
}
