#include #include #define rep(i,n) for (int i=1; i <= (n); ++i) #define all(a) a.begin(), a.end() using ll = long long; using namespace std; // ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } // const double PI = acos(-1); int main() { int n; cin >> n; if (n%6 == 0) cout << "Yes" << endl; else cout << "No" << endl; return 0; }