#include #define rep(i,n) for(int i = 0; i < n; i++) #define REP(i,s,n) for(int i = s; i < n; i++) typedef long long ll; using namespace std; using Graph = vector>; ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; } ll lcm(ll a, ll b) { return (a * b) / gcd(a,b); } ll ceil(const ll a, const ll b) { return (a + b - 1) / b; } int main(){ int n; cin >> n; if(n % 6 == 0)cout << "Yes" << endl; else cout << "No" << endl; return 0; }