#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
long long sito[N + 2];
vector<int> dzielniki[N + 2];
void prepro() {
  for (int i = (2); i <= (N); ++i) {
    if (!sito[i]) {
      for (int j = i; j <= N; j += i) {
        sito[j] = i;
        dzielniki[j].push_back(i);
      }
    } else {
      for (int j = i; j <= N; j += i) dzielniki[j].push_back(i);
    }
  }
}
vector<int> licz(int p) {
  p--;
  vector<int> v;
  v.push_back(0);
  for (int i = (1); i <= (p / 2 - 1); ++i) {
    v.push_back(i);
    v.push_back(p - i);
  }
  v.push_back(p / 2);
  for (int i = ((int)((v).size()) - 1); i >= (1); --i) {
    v[i] = (v[i] - v[i - 1] + p) % p;
  }
  return v;
}
long long qpot(long long a, long long b, long long mod) {
  long long wyn = 1;
  while (b > 0) {
    if (b % 2) {
      wyn = (wyn * a) % mod;
    }
    a = (a * a) % mod;
    b /= 2;
  }
  return wyn;
}
bool czek(long long a, long long p) {
  for (__typeof((dzielniki[p - 1]).begin()) it = ((dzielniki[p - 1]).begin());
       it != (dzielniki[p - 1]).end(); ++it) {
    if (*it < p - 1 && qpot(a, *it, p) == 1) return false;
  }
  return true;
}
long long generator(long long p) {
  while (true) {
    long long a = rand() % (p - 2);
    a += 2;
    if (czek(a, p)) return a;
  }
}
void jebaj() {
  srand(time(0));
  long long n;
  cin >> n;
  if (n == 4) {
    cout << "YES\n"
         << "1 \n 3 \n 2 \n 4 \n";
    return;
  }
  if (n == 1) {
    cout << "YES\n"
         << "1\n";
    return;
  }
  if (n == 2) {
    cout << "YES\n"
         << "1 \n 2 \n";
    return;
  }
  if (sito[n] != n) {
    cout << "NO\n";
    return;
  }
  long long g = generator(n);
  vector<int> v = licz(n);
  cout << "YES\n";
  for (__typeof((v).begin()) it = ((v).begin()); it != (v).end(); ++it) {
    cout << qpot(g, *it, n) << "\n";
  }
  cout << n << "\n";
}
int main() {
  prepro();
  ios_base::sync_with_stdio(0);
  int t;
  t = 1;
  for (int i = (0); i <= ((t)-1); ++i) {
    jebaj();
  }
}
