#include "bits/stdc++.h" using namespace std; typedef long long int ll; typedef pair pi; typedef pair, ll > pii; vector vec; vector > vec2; ll MOD = 1000000007; ll INF = 1145141919454519; int main(){ ll N; cin >> N; if(N % 6 == 0){ cout << "Yes" << endl; }else{ cout << "No" << endl; } }