#include <complex>
#include <iostream>
using namespace std;

typedef complex<double> P;

// ティツィツアテ・ツョツケテ」ツ?凖」ツつ凝ィツェツ、テ・ツキツョテ篠オ
#define EPS (1e-10)
// 2テ」ツ?、テ」ツ?ョテ」ツつケテ」ツつォテ」ツδゥテ」ツδシテ」ツ?古ァツュツ嘉」ツ?療」ツ??」ツ?凝」ツ?ゥテ」ツ??」ツ??
#define EQ(a,b) (abs((a)-(b)) < EPS)

// テ・ツ、ツ姪ァツゥツ?(cross product) : aテδ傭 = |a||b|sinテ篠?
double cross(P a, P b) {
  return (a.real() * b.imag() - a.imag() * b.real());
}

// 2テァツ崢エテァツキツ堙」ツ?ョテ・ツケツウティツ。ツ古・ツ按、テ・ツョツ?: a//b <=> cross(a, b) = 0
int is_parallel(P a1, P a2, P b1, P b2) {
  return EQ( cross(a1-a2, b1-b2), 0.0 );
}

int main(){
	int n;
	double x1,x2,x3,x4,y1,y2,y3,y4;

	cin >> n;
	for(int i=0 ; i<n ; i++){
		cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
		P a(x1,y1), b(x2,y2), c(x3,y3), d(x4,y4);
		if( is_parallel(a,b,c,d) ){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
}