#include<bits/stdc++.h>      using namespace std;      #define mp make_pair   #define fi first   #define se second   #define pb push_back   #define FOR(i,a,b) for(int i=a;i<=b;i++)   #define FORD(i,a,b) for(int i=a;i>=b;i--)   #define faster() ios_base::sync_with_stdio(0); cin.tie(NULL);cout.tie(NULL);      typedef long long ll;   typedef vector<int> vi;   typedef vector<ll> vll;      int main()   {       faster();       int t;       cin>>t;       while(t--)       {           int a[4];           FOR(i,0,3) cin>>a[i];           int max1=max(a[0],a[1]),max2=max(a[2],a[3]);           sort(a,a+4);           if(max1>max2 && max1==a[3] && max2==a[2]) cout<< YES <<endl;           else if(max1<max2 && max2==a[3] && max1==a[2]) cout<< YES <<endl;           else cout<< NO <<endl;       }       return 0;   }   