using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); public static void Main() { Solve(); } static void Solve() { var t = NN; var ans = new bool[t]; for (var u = 0; u < t; ++u) { var c = NList; if (c[0] == c[4] && c[1] == c[5] && c[2] == c[6] && c[3] == c[7]) ans[u] = true; var dbx = c[2] - c[0]; var dby = c[3] - c[1]; var dax = c[6] - c[4]; var day = c[7] - c[5]; if (dbx > dax && dbx * day == dax * dby) ans[u] = true; } WriteLine(string.Join("\n", ans.Select(f => f ? "Yes" : "No"))); } }