#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;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKI2RlZmluZSBpbnQgbG9uZyBsb25nCmRvdWJsZSBkaXN0YW5jZShkb3VibGUgeDEsIGRvdWJsZSB5MSwgZG91YmxlIHgyLCBkb3VibGUgeTIpewogICAgcmV0dXJuIHNxcnQoKHgyIC0geDEpICogKHgyIC0geDEpICsgKHkyIC0geTEpICogKHkyIC0geTEpKTsKfQp2b2lkIHNvbCgpewogICAgZG91YmxlIHgsIHksIHAsIHE7CiAgICBjaW4gPj4geCA+PiB5ID4+IHAgPj4gcTsKICAgIGlmKGRpc3RhbmNlKHgsIHksIHAsIHEpICsgZGlzdGFuY2UoMCwgMCwgcCwgcSkgPT0gZGlzdGFuY2UoMCwgMCwgeCwgeSkpIGNvdXQgPDwgIk5vXG4iOwogICAgZWxzZSBjb3V0IDw8ICJZZXNcbiI7Cn0Kc2lnbmVkIG1haW4oKXsKICAgIGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpOwogICAgY2luLnRpZShOVUxMKTsKICAgIGNvdXQudGllKE5VTEwpOwogICAgaW50IHQgPSAxOwogICAgY2luID4+IHQ7CiAgICB3aGlsZSh0LS0pewogICAgICAgIHNvbCgpOwogICAgfQogICAgcmV0dXJuIDA7Cn0=