#include <bits/stdc++.h>
using namespace std;
int ans[100005];
long long now, x, y;
long long ex_gcd(long long a, long long b) {
  if (b == 0) {
    x = 1, y = 0;
    return a;
  }
  long long d = ex_gcd(b, a % b);
  long long temp = x;
  x = y;
  y = temp - a / b * y;
  return d;
}
int main() {
  long long n;
  scanf("%I64d", &n);
  if (n == 4) {
    puts("YES\n1\n3\n2\n4\n");
    return 0;
  }
  ans[1] = 1;
  long long now = 1;
  for (long long i = 2; i < n; ++i) {
    long long d = ex_gcd(now, n);
    if (i % d != 0) {
      puts("NO");
      return 0;
    }
    long long A = now, B = n;
    ex_gcd(A, B);
    while (x < 0) x += n;
    x = x * i / d % n;
    if (x == 0) x = n;
    ans[i] = x;
    now = now * x % n;
  }
  puts("YES");
  ans[n] = n;
  for (int i = 1; i <= n; ++i) printf("%d\n", ans[i]);
  return 0;
}
