#include #include using namespace std; #define REP(i,first,last) for(int i=first;i> n; if (check(n)) { cout << "YES" << endl; } else { cout << "NO" << endl; } }