#include <bits/stdc++.h>
using namespace std;
template <class T>
void debug(T a, T b) {
  ;
}
template <class T>
void chmin(T& a, const T& b) {
  if (a > b) a = b;
}
template <class T>
void chmax(T& a, const T& b) {
  if (a < b) a = b;
}
namespace std {
template <class S, class T>
ostream& operator<<(ostream& out, const pair<S, T>& a) {
  out << '(' << a.first << ',' << a.second << ')';
  return out;
}
}  // namespace std
long long int readL() {
  long long int res;
  scanf("%I64d", &res);
  return res;
}
void printL(long long int res) { printf("%I64d", res); }
int n;
int mod = 1000000007;
struct Int {
  unsigned x;
  int mpow(Int a, int k) {
    Int res = 1;
    while (k) {
      if (k & 1) res = res * a;
      a = a * a;
      k >>= 1;
    }
    return res.x;
  }
  int inverse(Int a) { return mpow(a, mod - 2); }
  Int() : x(0) {}
  Int(long long sig) {
    int sigt = sig % mod;
    if (sigt < 0) sigt += mod;
    x = sigt;
  }
  int get() const { return (int)x; }
  Int& operator+=(Int that) {
    if ((x += that.x) >= mod) x -= mod;
    return *this;
  }
  Int& operator-=(Int that) {
    if ((x += mod - that.x) >= mod) x -= mod;
    return *this;
  }
  Int& operator*=(Int that) {
    x = (unsigned long long)x * that.x % mod;
    return *this;
  }
  Int& operator=(Int that) {
    x = that.x;
    return *this;
  }
  Int& operator/=(Int that) {
    x = (unsigned long long)x * inverse(that.x) % mod;
    return *this;
  }
  Int& operator-() {
    x = mod - x;
    if (x == mod) x = 0;
    return *this;
  }
  bool operator==(Int that) { return x == that.x; }
  bool operator!=(Int that) { return x != that.x; }
  Int operator+(Int that) const { return Int(*this) += that; }
  Int operator-(Int that) const { return Int(*this) -= that; }
  Int operator*(Int that) const { return Int(*this) *= that; }
  Int operator/(Int that) const { return Int(*this) /= that; }
};
namespace std {
ostream& operator<<(ostream& out, const Int& a) {
  out << a.get();
  return out;
}
istream& operator>>(istream& in, Int& a) {
  in >> a.x;
  return in;
}
};  // namespace std
bool isprime(int a) {
  for (int i = 2; i * i <= a; ++i)
    if (a % i == 0) return false;
  return true;
}
int main() {
  cin >> n;
  if (!isprime(n) && n != 1 && n != 4)
    puts("NO");
  else {
    puts("YES");
    if (n == 1)
      puts("1");
    else if (n == 4) {
      printf("%d\n%d\n%d\n%d\n", 1, 3, 2, 4);
    } else {
      mod = n;
      puts("1");
      for (int i = 2; i < n; ++i) {
        Int a = i;
        a /= i - 1;
        printf("%d\n", a.x);
      }
      printf("%d\n", n);
    }
  }
  return 0;
}
