#include using namespace std; int main() { int T; cin >> T; while(T--) { int x1, y1, x2, y2, X1, Y1, X2, Y2; cin >> x1 >> y1 >> x2 >> y2 >> X1 >> Y1 >> X2 >> Y2; cout << (((long long)(y2-y1)*(long long)(X2-X1) == (long long)(Y2-Y1) * (long long)(x2-x1)) && ((long long)(Y2-Y1) * (long long)(Y2-Y1) + (long long)(X2-X1) * (long long)(X2-X1) < (long long)(y2-y1) * (long long)(y2-y1) + (long long)(x2-x1) * (long long)(x2-x1)) ? "Yes"s : "No"s) << endl; } return 0; }