#include <bits/stdc++.h>
inline long long mod(long long a, long long n) {
  return (a >= n) ? (a % n) : a;
}
inline long long mul(long long a, long long b, long long n) {
  return mod(a * b, n);
}
inline long long fpow(long long b, long long e, long long n) {
  long long answer;
  answer = 1;
  while (e) {
    if (e & 1) {
      answer = mul(answer, b, n);
    }
    b = mul(b, b, n);
    e >>= 1;
  }
  return answer;
}
inline long long inv(long long a, long long n) { return fpow(a, n - 2, n); }
inline bool is_prime(long long n) {
  bool fa2, fa3;
  long long s, d, i, a2, a3;
  if (n == 2 || n == 3) {
    return true;
  }
  if ((n & 1) == 0) {
    return false;
  }
  s = 0;
  d = n - 1;
  while ((d & 1) == 0) {
    ++s;
    d >>= 1;
  }
  a2 = fpow(2, d, n);
  a3 = fpow(3, d, n);
  fa2 = (a2 == 1);
  fa3 = (a3 == 1);
  for (i = 0; i <= s - 1 && (!fa2 || !fa3); ++i) {
    if (a2 == n - 1) {
      fa2 = true;
    }
    if (a3 == n - 1) {
      fa3 = true;
    }
    a2 = mul(a2, a2, n);
    a3 = mul(a3, a3, n);
  }
  return (fa2 && fa3);
}
int main(void) {
  long long i, n;
  std::cin >> n;
  if (n == 1) {
    std::cout << "YES\n1\n";
  } else if (n == 4) {
    std::cout << "YES\n1\n3\n2\n4\n";
  } else if (is_prime(n)) {
    std::cout << "YES\n1\n";
    for (i = 2; i < n; ++i) {
      std::cout << mul(i, inv(i - 1, n), n) << "\n";
    }
    std::cout << n << "\n";
  } else {
    std::cout << "NO\n";
  }
  return 0;
}
