#include using namespace std; typedef long long ll; typedef pair P; int dp[350]; int main(){ ll n; cin>>n; if(n%6==0)cout<<"Yes"<