#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(int i=0;i> T; while(T--){ ll x1,y1,x2,y2,X1,Y1,X2,Y2; cin >> x1 >> y1 >> x2 >> y2 >> X1 >> Y1 >> X2 >> Y2; if((y2-y1)*(X2-X1)!=(x2-x1)*(Y2-Y1) || (x2-x1)*(X2-X1)+(y2-y1)*(Y2-Y1)<0){ cout << "No" << endl; continue; } if((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)<=(X1-X2)*(X1-X2)+(Y1-Y2)*(Y1-Y2)){ if(x1==X1 && y1==Y1 && x2==X2 && y2==Y2){ cout << "Yes" << endl; continue; }else{ cout << "No" << endl; continue; } } cout << "Yes" << endl; } return 0; }