ans :: [Double] -> String
ans (x1:y1:x2:y2:x3:y3:x4:y4:_) =
  if (y2-y1) * (x4-x3) == (y4-y3) * (x2-x1)
  then "YES"
  else "NO"

main = do
  c <- getContents
  let i = map (map read) $ map words $ drop 1 $ lines c :: [[Double]]
      o = map ans i
  mapM_ putStrLn o