#include using namespace std; int main() { int N; cin >> N; if (N % 6 == 0) cout << "Yes"; else cout << "No"; cout << endl; return 0; }