#include #include using namespace std; struct koma { int x; int y; void kin(int x0, int y0) { x = x0; y = y0; return; } bool kcheck(int x0, int y0) { if(x0 == x && y0 == y){ return true; } else { return false; } } void kout() { cout << "(" << x << ", " << y << ")" << endl; } }; int main() { int n; cin >> n; vector k(3); k[0].kin(2, 8); k[1].kin(3, 9); k[2].kin(7, 9); for(int i=0; i> x0 >> y0 >> x1 >> y1; for(int j=0; j<3; j++) { if(k[j].kcheck(x0, y0)){ k[j].kin(x1, y1); break; } } } /* k[0].kout(); k[1].kout(); k[2].kout(); */ if(k[0].kcheck(5, 8) && k[1].kcheck(4, 8) && k[2].kcheck(6, 8)){ cout << "YES" << endl; } else { cout << "NO" << endl; } }