#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
void rd(long long &x) {
  x = 0;
  char s;
  s = getchar();
  long long f = 1;
  while (!isdigit(s)) {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (isdigit(s)) {
    x = x * 10 + s - '0';
    s = getchar();
  }
  x *= f;
  return;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
void rep(long long &a, long long b) {
  a %= b;
  a += b;
  a %= b;
}
long long p;
long long mul(long long a, long long b) {
  long long res = 0;
  while (b) {
    if (b & 1) {
      res += a;
      rep(res, p);
    }
    b >>= 1;
    a = a + a;
    rep(a, p);
  }
  return res;
}
long long pow(long long a, long long b, long long p) {
  rep(a, p);
  long long res = 1;
  while (b) {
    if (b & 1) {
      res = res * a;
      rep(res, p);
    }
    b >>= 1;
    a = a * a;
    rep(a, p);
  }
  return res;
}
long long ex_gcd(long long a, long long b, long long &x, long long &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  long long d = ex_gcd(b, a % b, x, y);
  long long z = x;
  x = y;
  y = z - a / b * y;
  return d;
}
long long bsgs(long long a, long long r, long long p) {
  map<long long, long long> ma;
  map<long long, bool> cunzai;
  ma.clear();
  cunzai.clear();
  long long tt = (long long)sqrt(p) + 1;
  for (long long i = 0; i < tt; i++) {
    long long val = pow(a, i, p) * r;
    rep(val, p);
    ma[val] = i;
    cunzai[val] = 1;
  }
  a = pow(a, tt, p);
  if (a == 0) {
    return r == 0 ? 1 : -1;
  }
  for (long long i = 0; i <= tt; i++) {
    long long tem = pow(a, i, p);
    if (cunzai[tem]) {
      long long j = ma[tem];
      if (j >= 0 and i * tt - j >= 0) return i * tt - j;
    }
  }
  return -1;
}
long long n;
long long euler(long long x) {
  long long tt = sqrt(x);
  long long res = x;
  for (long long i = 2; i <= tt; i++) {
    if (x % i == 0) {
      res = res / i * (i - 1);
      while (x % i == 0) {
        x /= i;
      }
    }
  }
  if (x > 1) {
    res = res / x * (x - 1);
  }
  return res;
}
bool isprime(long long x) {
  if (x == 1) return 0;
  if (x == 2) return 1;
  long long tt = sqrt(x);
  for (long long i = 2; i <= tt; i++) {
    if (x % i == 0) return 0;
  }
  return 1;
}
bool isp[3 * 1123456];
long long sum[1123456];
void getprime() {
  memset(isp, 1, sizeof(isp));
  isp[1] = 0;
  for (long long i = 2; i < 3 * 1123456; i++) {
    if (isp[i] == 0) {
      continue;
    }
    for (long long j = i + i; j < 3 * 1123456; j += i) {
      isp[j] = 0;
    }
  }
}
signed main() {
  cin >> n;
  if (n == 4) {
    cout << "YES" << '\n';
    cout << 1 << '\n';
    cout << 3 << '\n';
    cout << 2 << '\n';
    cout << 4 << '\n';
    return 0;
  }
  if (n == 1) {
    cout << "YES" << '\n';
    cout << 1 << '\n';
    return 0;
  }
  if (!isprime(n)) {
    cout << "NO" << '\n';
    return 0;
  } else {
    cout << "YES" << '\n';
    for (long long i = 1; i <= n; i++) {
      if (i == 1) {
        cout << 1 << '\n';
      } else {
        long long x, y;
        long long d = ex_gcd(i - 1, n, x, y);
        x *= i / d;
        rep(x, n / d);
        if (x == 0) {
          x = n;
        }
        cout << x << '\n';
      }
    }
  }
  return 0;
}
