#include #include #include #include #include #include #include using namespace std; int main(){ char c[10][10]; for(int i=0;i<10;i++){ for(int j=0;j<10;j++){ c[i][j]=' '; } } c[2][8]='A'; c[3][9]='B'; c[7][9]='C'; int n; cin >> n; for(int i=0;i> x1 >> y1 >> x2 >> y2; //c[x2][y2]=c[x1][y1]; swap(c[x1][y1],c[x2][y2]); } if(c[5][8]=='A' && c[4][8]=='B' && c[6][8]=='C'){ cout << "YES" << endl; }else{ cout << "NO" << endl; } return 0; }