#include #include using namespace std; int n; vector memo; int dfs(int k){ if(k==0)return ~n&1; if(memo[k]!=-1)return memo[k]; int res=0; if(1<=k)res|=!dfs(k-1); if(2<=k)res|=!dfs(k-2); if(3<=k)res|=!dfs(k-3); return memo[k]=res; } int main(){ cin>>n; memo.resize(n+1,-1); cout<<(dfs(n)==-1?"Yes":"No")<<"\n"; }