#include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int T; cin >> T; while(T--){ long long x1,y1,x2,y2,X1,Y1,X2,Y2; cin >> x1 >> y1 >> x2 >> y2 >> X1 >> Y1 >> X2 >> Y2; bool ok1 = false,ok2 = false; long long D = (x2-x1)*(x2-x1)+(y2-y1)*(y2-y1),A = (X2-X1)*(X2-X1)+(Y2-Y1)*(Y2-Y1); if(A == 0 || D <= A){cout << "No" << endl; continue;} long long adx = X2-X1,ady = Y2-Y1,ddx = x2-x1,ddy = y2-y1; if(adx*ddy == ady*ddx) cout << "Yes" << endl; else cout << "No" << endl; } }