#include using namespace std; int main() { int n,m,t,p,a,b,c,d; cin>>t; while(t--) { cin>>p; for(int i=0;i>n>>m; } if(n!=m || n==m==0) cout<<"YES"<