#include #include #include #include #include #include #include using namespace std; int main(){ char c[10][10]; 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]; } if(c[5][8]=='A' && c[4][8]=='B' && c[6][8]=='C'){ cout << "YES" << endl; }else{ cout << "NO" << endl; } return 0; }