#include #define REP(i,n) for(int i=0,i##_len=(n);i>N; vector> porn(10,vector(10,0)); porn[2][8]=1; porn[3][9]=2; porn[7][9]=3; REP(i,N){ int x1,y1,x2,y2; cin>>x1>>y1>>x2>>y2; porn[x2][y2]=porn[x1][y1]; } if(porn[5][8]==1&&porn[4][8]==2&&porn[6][8]==3) cout<<"YES"<