#include #include #include #include #include #include #include #include #include #include #include #include #define vll vector #define vvvl vector #define vvl vector> #define VV(a, b, c, d) vector>(a, vector(b, c)) #define VVV(a, b, c, d) vector(a, vvl(b, vll (c, d))); #define re(c, b) for(ll c=0;c p; int main(int argc, char const *argv[]) { ll n;std::cin >> n; vector

v(3); v[0] = p(2, 8); v[1] = p(3, 9); v[2] = {7, 9}; for(int i=0;i> a >> b >> c >> d; for(int j=0;j<3;j++){ if(v[j].first==a&&v[j].second==b){ v[j] = {c, d}; } } } if(v[0]==p(5, 8)&&v[1]==p(4, 8)&&v[2]==p(7, 9)){ std::cout << "YES" << '\n'; }else{ std::cout << "NO" << '\n'; } return 0; }