#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
const int M = 1e7 + 7;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int mod = 1000000007;
int n, id[N], a[N], inv[N];
int main() {
  scanf("%d", &n);
  if (n == 1) {
    puts("YES");
    puts("1");
    return 0;
  }
  if (n == 4) {
    puts("YES");
    puts("1\n3\n2\n4");
    return 0;
  }
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      puts("NO");
      return 0;
    }
  }
  inv[1] = 1;
  for (int i = 2; i < N; i++) inv[i] = 1ll * (n - n / i) * inv[n % i] % n;
  puts("YES\n1");
  int now = 1;
  for (int i = 2; i < n; i++) {
    int need = 1ll * i * inv[i - 1] % n;
    printf("%d\n", need);
  }
  printf("%d\n", n);
  return 0;
}
