In a coordinate system,There are 3 chocolate which will be placed at three random position (x1,y1),(x2,y2) and (x3,y3).Ramesh loves Chocolates. Ramesh always moves along a straight line. your task is to find out whether he can have all the chocolates.

Input Format :-
The first line of the input contains an integer T denoting the number of test cases. Each of the next T lines contains coordinates in integer- x1 y1 x2 y2 and x3 y3.

Output Format :-
If Ramesh can get all chocolates then print "YES" otherwise "NO"(without quotes).

Constraints :-
1 ≤ T ≤ 100
-1000 ≤ x1,y1,x2,y2,x3,y3 ≤ 1000

SAMPLE INPUT
2
1 1 2 2 3 3
1 2 5 4 10 15

SAMPLE OUTPUT
YES
NO
def isHori(p1, p2):
	if p1.x == p2.x:
		return True

def isVert(p1,p2):
	if p1.y == p2.y:
		return True

def isDia(p1, p2):
	if abs(p1.x-p2.x) == abs(p1.y-p2.y):
		return True

class Point:
	def __init__(self, x, y):
		self.x = x
		self.y = y


tc = int(raw_input())
for i in range(tc):
	data = map(int, raw_input().strip().split())
	p1 = Point(data[0], data[1])
	p2 = Point(data[2], data[3])
	p3 = Point(data[4], data[5])
	if(isHori(p1, p2) and isHori(p2, p3) and isHori(p3, p1) \
		or isDia(p1, p2) and isDia(p2, p3) and isDia(p3, p1) \
		or isVert(p1, p2) and isVert(p2, p3) and isVert(p3, p1)):
		print "YES"
	else:
		print "NO"