using namespace std;
long long N,x,y,u,v;
int main()
{
cin>>N>>x>>y>>u>>v;
if((x+y)%2==0 and (u+v)%2==0) cout<<"yes";
else if ((x+y)%2==1 and (u+v)%2==1) cout<<"yes";
else cout<<"no";
return 0;
}
using namespace std;
long long N,x,y,u,v;
int main()
{
cin>>N>>x>>y>>u>>v;
if(x%2==0 and y%2==0 and u%2==0 and v%2==0) cout<<"yes";
else if(x%2==1 and y%2==1 and u%2==0 and v%2==0) cout<<"yes";
else if(x%2==0 and y%2==0 and u%2==1 and v%2==1) cout<<"yes";
else if(x%2==1 and y%2==1 and u%2==1 and v%2==1) cout<<"yes";
else if(x%2==0 and y%2==1 and u%2==0 and v%2==1) cout<<"yes";
else if(x%2==0 and y%2==1 and u%2==1 and v%2==0) cout<<"yes";
else if(x%2==1 and y%2==0 and u%2==1 and v%2==0) cout<<"yes";
else if(x%2==1 and y%2==0 and u%2==0 and v%2==1) cout<<"yes";
else cout<<"no";
return 0;
Comments
include<bits/stdc++.h>
using namespace std; long long N,x,y,u,v; int main() { cin>>N>>x>>y>>u>>v; if((x+y)%2==0 and (u+v)%2==0) cout<<"yes"; else if ((x+y)%2==1 and (u+v)%2==1) cout<<"yes"; else cout<<"no"; return 0; }
include <bits/stdc++.h>
using namespace std; long long x,y,u,v; int main() { cin>>x>>y>>u>>v; if((x+y)%2==(u+v)%2) cout<<"Yes"; else cout<<"No"; return 0; }
include<bits/stdc++.h>
using namespace std; long long N,x,y,u,v; int main() { cin>>N>>x>>y>>u>>v; if(x%2==0 and y%2==0 and u%2==0 and v%2==0) cout<<"yes"; else if(x%2==1 and y%2==1 and u%2==0 and v%2==0) cout<<"yes"; else if(x%2==0 and y%2==0 and u%2==1 and v%2==1) cout<<"yes"; else if(x%2==1 and y%2==1 and u%2==1 and v%2==1) cout<<"yes"; else if(x%2==0 and y%2==1 and u%2==0 and v%2==1) cout<<"yes"; else if(x%2==0 and y%2==1 and u%2==1 and v%2==0) cout<<"yes"; else if(x%2==1 and y%2==0 and u%2==1 and v%2==0) cout<<"yes"; else if(x%2==1 and y%2==0 and u%2==0 and v%2==1) cout<<"yes"; else cout<<"no"; return 0;
}