#include<bits/stdc++.h>
using namespace std;
#define int long long
double distance(double x1, double y1, double x2, double y2){
    return sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
}
void sol(){
    double x, y, p, q;
    cin >> x >> y >> p >> q;
    if(distance(x, y, p, q) + distance(0, 0, p, q) == distance(0, 0, x, y)) cout << "No\n";
    else cout << "Yes\n";
}
signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int t = 1;
    cin >> t;
    while(t--){
        sol();
    }
    return 0;
}