#include <bits/stdc++.h>
int ans[100000], inv[100000 + 1] = {};
bool isPrime(int n) {
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
int exgcd(int a, int b, long long &x, long long &y) {
  if (a % b == 0) {
    x = 0, y = 1;
    return b;
  }
  int g = exgcd(b, a % b, x, y);
  long long tmp = x;
  x = y, y = tmp - a / b * y;
  return g;
}
int getInverse(int m, int n) {
  if (inv[m] > 0) return inv[m];
  long long x, y;
  int g = exgcd(m, n, x, y);
  if (g != 1) {
    printf("g = %d\n", g);
    return -1;
  }
  x %= n;
  if (x < 0) x += n;
  return x;
}
void setAns(int n) {
  ans[0] = 1, ans[n - 1] = n;
  inv[1] = 1;
  for (int i = 2; i < n; i++) {
    long long tmp = getInverse(i, n);
    assert(tmp != -1);
    assert(i * tmp % n == 1);
    inv[i] = tmp;
    inv[tmp] = i;
  }
  for (int i = 1; i < n - 1; i++) {
    ans[i] = ((long long)(i + 1)) * inv[i] % n;
  }
  return;
}
int main() {
  int n;
  scanf("%d", &n);
  if (n == 1) {
    puts("YES");
    puts("1");
  } else if (n == 2) {
    puts("YES");
    printf("1\n2\n");
  } else if (n == 4) {
    puts("YES");
    printf("1\n3\n2\n4\n");
  } else if (!isPrime(n)) {
    puts("NO");
  } else {
    setAns(n);
    puts("YES");
    for (int i = 0; i < n; i++) printf("%d\n", ans[i]);
  }
  return 0;
}
