#include <bits/stdc++.h>
using namespace std;
int modInverse(int a, int m) {
  int m0 = m;
  int y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    int q = a / m;
    int t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
long long prime(long long x) {
  for (long long i = 2; i <= sqrt(x); i++) {
    if (x % i == 0) {
      return 0;
    }
  }
  return 1;
}
int main() {
  long long n;
  cin >> n;
  if (n <= 3) {
    cout << "YES\n";
    for (long long i = 1; i <= n; i++) {
      cout << i << "\n";
    }
    return 0;
  }
  if (n == 4) {
    cout << "YES\n1\n3\n2\n4\n";
    return 0;
  }
  if (prime(n)) {
    cout << "YES\n1\n";
    for (long long i = 2; i <= n - 1; i++) {
      long long x = modInverse(i - 1, n);
      x *= i;
      x = x % n;
      cout << x << "\n";
    }
    cout << n << "\n";
  } else {
    cout << "NO\n";
  }
}
