#include using namespace std; bool isOverlap(pair p1,pair p2,pair p3,pair p4){ if(p1.first>p4.first || p2.firstp3.second) return false; return true; } int main(){ int t; cin>>t; while(t--){ pair p1,p2,p3,p4; cin>>p1.first>>p1.second; cin>>p2.first>>p2.second; cin>>p3.first>>p3.second; cin>>p4.first>>p4.second; cout<