#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 30;
long long Mod, n;
long long mul(long long a, long long b) { return (a * b) % Mod; }
long long Pow(long long a, long long b) {
  long long res = 1;
  for (; b; b >>= 1, a = mul(a, a))
    if (b & 1) res = mul(res, a);
  return res;
}
long long inv(long long x) { return Pow(x, Mod - 2); }
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cin >> n;
  Mod = n;
  if (n == 1) return cout << "YES\n1", 0;
  if (n == 4) return cout << "YES\n1\n3\n2\n4", 0;
  for (int i = 2; i < n; i++)
    if (n % i == 0) return cout << "NO", 0;
  cout << "YES\n1\n";
  for (int i = 1; i < n - 1; i++) cout << mul(i + 1, inv(i)) << '\n';
  cout << n;
}
