Triangle
题号:NC222978
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

You are given two triangles on the plane.
Check if they are similar.


输入描述:

The first line contains a positive integer T.

For each case, there will be six lines,each lines contain two integers,means the x, y coordinates of points.

And the first three lines are the vertexs of the first triangle.

The second three lines are the vertexs of the first triangle.

输出描述:

For each case ,if two triangles are similar then print "YES",else print "NO".

示例1

输入

复制
2
0 0
0 1
1 0
1 1
0 1
1 0
0 0
0 1
1 0
2 2
2 0
1 0

输出

复制
YES
NO