#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b, int& x, int& y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  int x1, y1;
  int d = gcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
int inverse(int a, int m) {
  int x, y;
  int g = gcd(a, m, x, y);
  if (g != 1)
    cout << "no solution";
  else {
    x = (x % m + m) % m;
    return x;
  }
}
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << "YES" << endl << 1;
  } else if (n == 4) {
    cout << "YES" << endl << 1 << endl << 3 << endl << 2 << endl << 4;
  } else {
    for (int i = 2; i < n; i++) {
      if (n % i == 0) {
        cout << "NO";
        return 0;
      }
    }
    cout << "YES" << endl;
    cout << 1 << endl;
    for (int i = 2; i < n; i++) {
      int b = inverse(i - 1, n);
      cout << ((long long)b * (long long)i) % (long long)n << endl;
    }
    cout << n << endl;
  }
  return 0;
}
