#include using namespace std; using Int=long long; using Real=long double; templateinline bool chmin(T&A,S B){return(A>B?A=B,1:0);} templateinline bool chmax(T&A,S B){return(A>A[i]; REP(i,3)cin>>B[i]; REP(i,3)REP(j,3) { bool ok=true; swap(A[i],B[j]); REP(k,2) { auto C=k?A:B; int a=C[0],b=C[1],c=C[2]; ok=ok&&a!=b&&a!=c&&b!=c&&(max(a,max(b,c))==b||min(a,min(b,c))==b); } swap(A[i],B[j]); if(ok)drop("Yes"); } cout<<"No\n"; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cout<>T; while(T--)sol(); }