#include using namespace std; using Int = long long; #define double long double signed main(){ Int n; cin>>n; while(n--){ vector x(3),y(3); for(Int i=0;i<3;i++) cin>>x[i]; for(Int i=0;i<3;i++) cin>>y[i]; if(x[0]<=x[1]&&y[0]<=y[1]&&x[1]<=x[2]&&y[1]<=y[2]){ cout<<"NO"<=x[1]&&y[0]>=y[1]&&x[1]>=x[2]&&y[1]>=y[2]){ cout<<"NO"<x[2]){ cout<<"YES"<x[1]&&x[1]y[1]||(x[0]>x[1]&&y[0]==y[1]))&& (y[2]>y[1]||(x[2]>x[1]&&y[2]==y[1]))){ cout<<"YES"<y[1]){ if(x[0]==x[1]) a=0; else{ double l=0,r=1e18; for(Int i=0;i<200;i++){ double m=(l+r)/2; if(x[0]+y[0]*m>=x[1]+y[1]*m) r=m; else l=m; } a=r; } } if(x[0]>=x[1]&&y[0]y[1]){ if(x[2]==x[1]) b=0; else{ double l=0,r=1e18; for(Int i=0;i<200;i++){ double m=(l+r)/2; if(x[2]+y[2]*m>=x[1]+y[1]*m) r=m; else l=m; } b=r; } } if(x[2]>=x[1]&&y[2]EPS||a==b); if(abs(a-b)>EPS){ cout<<"YES"<=x[1]){ if(x[1]>=x[2]){ //assert(abs(a-b)>EPS||a==b); if(abs(a-b)>EPS){ cout<<"YES"<