import std.stdio;
import std.math;
import std.string;
import std.conv;

int main(){
	
	readln;
	
	string l;
	while((l = readln.chomp, l.length)){
		float x1, y1, x2, y2, x3, y3, x4, y4;
		string[] columns = l.split();
		
		x1 = to!float(columns[0]), y1 = to!float(columns[1]),
		x2 = to!float(columns[2]), y2 = to!float(columns[3]), 
		x3 = to!float(columns[4]), y3 = to!float(columns[5]),
		x4 = to!float(columns[6]), y4 = to!float(columns[7]);
		
		float a, b, c, d;
		a = x1 - x2, b = y1 - y2, 
		c = x3 - x4, d = y3 - y4;
		
		if(a * d - b * c == 0.0) printf("YES\n");
		else printf("NO\n");
		}
	
	return 0;
	}