#include <bits/stdc++.h>
using namespace std;
int ks(int a, int b, int c) {
  int sum = 1;
  while (b) {
    if (b % 2 == 1) sum = 1LL * sum * a % c;
    a = 1LL * a * a % c;
    b /= 2;
  }
  return sum;
}
bool isp(int n) {
  for (int i = 2; i < n; i++)
    if (n % i == 0) return false;
  return true;
}
int main() {
  int n;
  scanf("%d", &n);
  if (n == 1)
    cout << "YES\n" << 1 << endl;
  else if (n == 4)
    printf("YES\n1\n3\n2\n4\n");
  else if (isp(n)) {
    printf("YES\n1\n");
    for (int i = 2; i < n; i++)
      cout << 1LL * i * ks(i - 1, n - 2, n) % n << endl;
    printf("%d\n", n);
  } else
    puts("NO");
}
