#include #include using m = atcoder::modint; int main() { int p; std::cin >> p; m::set_mod(p); std::cout << (m(8).pow((p - 1) / 2).val() == 1 ? "YES" : "NO"); }