#include <bits/stdc++.h>
using namespace std;
bool is_prime(int n) {
  for (int i = 2; i * i <= n; ++i)
    if (n % i == 0) return false;
  return true;
}
void ok() { cout << "YES" << endl; }
void no() { cout << "NO" << endl; }
int gcd(int a, int b, int& x, int& y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  int x1, y1;
  int d = gcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
int inv(int a, int m) {
  int x, y;
  int g = gcd(a, m, x, y);
  return (x % m + m) % m;
}
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    ok();
    cout << 1 << endl;
    return 0;
  }
  if (!is_prime(n) & n != 4) {
    no();
    return 0;
  }
  ok();
  cout << 1 << endl;
  int c = 1;
  for (int i = 3; i < n; i += 2) {
    int v = inv(c, n);
    v = (1LL * v * i) % n;
    cout << v << endl;
    c = i;
  }
  for (int i = 2; i < n; i += 2) {
    int v = inv(c, n);
    v = (1LL * v * i) % n;
    cout << v << endl;
    c = i;
  }
  cout << n << endl;
  return 0;
}
