#include using namespace std; using namespace chrono; #if __has_include() #include using namespace atcoder; #endif int main() { int64_t n; cin >> n; cout << ((n % 6 == 0) ? "Yes" : "No") << endl; return 0; }