#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b, int& x, int& y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  } else {
    int x1, y1;
    int d = gcd(b, a % b, x1, y1);
    x = y1;
    y = x1 - a / b * y1;
    return d;
  }
}
bool Make(vector<int>& Res, int n) {
  Res.resize(n);
  Res[0] = 1;
  if (n == 4) {
    Res[1] = 3;
    Res[2] = 2;
    Res[3] = 4;
    return true;
  }
  for (int i = 1; i < n; i++) {
    int x, y;
    int d = gcd(i, n, x, y);
    if ((i + 1) % d) return false;
    x = (x < 0) ? n + x : x;
    Res[i] = x + 1;
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  vector<int> Res;
  if (Make(Res, n)) {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) cout << Res[i] << ' ' << endl;
  } else
    cout << "NO" << endl;
  return 0;
}
