#include <bits/stdc++.h>
using namespace std;
int n, m;
int vis[100005];
int rev(int x, int p) {
  int tmp = 1;
  while (p) {
    if (p & 1) tmp = 1ll * tmp * x % n;
    p >>= 1;
    x = 1ll * x * x % n;
  }
  return tmp;
}
int main() {
  scanf("%d", &n);
  int cur = 1;
  if (n != 1 && n != 4)
    for (int i = 2; i * i <= n; ++i)
      if (n % i == 0) return puts("NO"), 0;
  puts("YES");
  if (n == 1)
    puts("1");
  else if (n == 4)
    printf("1\n3\n2\n4\n");
  else {
    puts("1");
    for (int i = 2; i < n; ++i) printf("%d\n", 1ll * i * rev(i - 1, n - 2) % n);
    printf("%d\n", n);
  }
  return 0;
}
