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