(function () {
  var input = '';

  function main () {
    var i, 
        dataSet,
        inputLen = input.length - 1;

    for (i = 1; i < inputLen; i += 1) {
      dataSet = input[i].split(' ');

      console.log(judgeParallelism(dataSet));
    }
  }

  function judgeParallelism (data) {
    var ab = 0,
        cd = 0,
        x1 = Number(data[0]),
        y1 = Number(data[1]),
        x2 = Number(data[2]),
        y2 = Number(data[3]),
        x3 = Number(data[4]),
        y3 = Number(data[5]),
        x4 = Number(data[6]),
        y4 = Number(data[7]);

    if (x2 - x1 !== 0) {
      ab = (y2 - y1) / (x2 - x1);
    }
    
    if (x4 - x3 !== 0) {
      cd = (y4 - y3) / (x4 - x3);
    }

    if (ab === cd) {
      return 'YES';
    } else {
      return 'NO';
    }
  }

  process.stdin.resume();
  process.stdin.setEncoding('utf8');
  process.stdin.on('data', function (chunk) {
    input += chunk;
  });

  process.stdin.on('end', function () {
    input = input.split('\n');
    main();
  });
}());