#include <bits/stdc++.h>
using namespace std;
bool isnp[100001];
unordered_set<int> primes;
long long int inv[100001];
void pre() {
  int i, j;
  isnp[1] = 1;
  for (i = 2; i <= sqrt(100001); i++)
    if (!isnp[i]) {
      primes.insert(i);
      for (j = i * i; j < 100001; j += i) isnp[j] = 1;
    }
  for (; i < 100001; i++)
    if (!isnp[i]) primes.insert(i);
}
void prep(long long int m) {
  inv[1] = 1;
  for (int i = 2; i < m; i++) inv[i] = (m - ((inv[m % i] * (m / i)) % m)) % m;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  pre();
  int i, n;
  cin >> n;
  if (n == 1)
    cout << "YES\n1";
  else if (n == 4)
    cout << "YES\n1\n3\n2\n4";
  else {
    if (primes.count(n)) {
      prep(n);
      cout << "YES\n1\n";
      for (i = 1; i < n - 1; i++) cout << (inv[i] * (i + 1)) % n << "\n";
      cout << n;
    } else
      cout << "NO";
  }
}
