def parallel?(x1, y1, x2, y2, x3, y3, x4, y4)
  return ((x1 - x2) * (y3 - y4)).round(11) == ((y1 - y2) * (x3 - x4)).round(11)
end
gets.to_i.times do
  if parallel?(*gets.split(" ").map(&:to_f))
    puts "YES"
  else
    puts "NO"
  end
end