#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define all(c) (c).begin(), (c).end() #define iter(c) __typeof((c).begin()) #define cpresent(c, e) (find(all(c), (e)) != (c).end()) #define tr(c, i) for (iter(c) i = (c).begin(); i != (c).end(); ++i) #define pb(e) push_back(e) #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define rep(i,n) FOR(i,0,n) #define mp(a,b) make_pair((a), (b)) #define mt(a,b,c) make_tuple((a),(b),(c)) typedef long long ll; int main(){ int n; cin >> n; if(n%6) cout << "No" << endl; else cout << "Yes" << endl; return 0; }