let () =
  Scanf.scanf "%d\n"
    (fun n -> Array.init n (fun _ ->
         Scanf.scanf "%f %f %f %f %f %f %f %f\n"
           (fun x1 y1 x2 y2 x3 y3 x4 y4 ->
              if abs_float ((y2 -. y1)*.(x4 -. x3) -. (x2 -. x1)*.(y4 -. y3)) < 0.0000000001 then "YES\n" else "NO\n")))
  |> Array.fold_left (^) "" |> print_string
