#include using namespace std; int main(void){ int t; cin>>t; while(t--){ long long sx,sy,tx,ty; cin>>sx>>sy>>tx>>ty; if(max(sy,ty)>=61){ cout<