#include using namespace std; using ll = long long; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin>> n; cout << (n % 6 == 0 ? "Yes" : "No") << endl; return 0; }