#include <bits/stdc++.h>
using namespace std;
int n;
int find(int m, int x) {
  if (!m) return 1;
  long long ans = find(m / 2, x);
  ans = ans * ans % n;
  if (m & 1) ans = ans * x % n;
  return ans;
}
int main() {
  cin >> n;
  if (n == 1 || n == 4) {
    cout << "YES\n";
    if (n == 1)
      cout << 1;
    else
      printf("1 3 2 4");
    return 0;
  }
  for (int i = 2; i < n; i++)
    if (n % i == 0) {
      cout << "NO\n";
      return 0;
    }
  cout << "YES\n1 ";
  for (int i = 1; i < n - 1; i++)
    printf("%d ", (long long)(i + 1) * find(n - 2, i) % n);
  cout << n;
}
