#include #define F first #define S second using namespace std; int main() { int n,flag=0; pair p,q; cin>>n; cin>>p.F>>p.S; for(int i=1;i>q.F>>q.S; if(p.F!=q.F && p.S!=q.S) { flag=1; break; } } if(flag==1) cout<<"NO"<