import std.stdio;
import std.conv;
import std.algorithm;
import std.range;
import std.string;
import std.math;
import std.format;

void main() {
  readln;

  foreach (string line; stdin.lines) {
    double x1, y1, x2, y2, x3, y3, x4, y4;
    line.formattedRead("%f %f %f %f %f %f %f %f",
                       &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4);

    double ab = (y2 - y1) / (x2 - x1);
    double cd = (y4 - y3) / (x4 - x3);

    if (ab == cd) {
      "YES".writeln;
    } else {
      "NO".writeln;
    }
  }
}