#include <bits/stdc++.h>
using namespace std;
bool isprime(int n) {
  if (n < 2) return false;
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
int po(int a, int b, int p) {
  if (b == 0) return 1;
  int t = po(a, b >> 1, p);
  t = (1LL * t * t) % p;
  if (b & 1) return (1LL * t * a) % p;
  return t;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  if (n == 1) {
    cout << "YES\n1\n";
    return 0;
  }
  if (n == 4) {
    cout << "YES\n1\n3\n2\n4\n";
    return 0;
  }
  if (isprime(n))
    cout << "YES\n";
  else {
    cout << "NO\n";
    return 0;
  }
  cout << "1\n";
  for (int i = 2; i < n; i++)
    cout << (1LL * i * po(i - 1, n - 2, n)) % n << '\n';
  cout << n << "\n";
  return 0;
}
