judge :: [Double] -> String 
judge [x1,y1,x2,y2,x3,y3,x4,y4]
  | (x1 - x2) / (y1 - y2) == (x3 - x4) / (y3 - y4) = "YES"
  | otherwise = "NO"

main = do
  s' <- getContents
  let s = map (map (read :: String -> Double)) $ map words $ tail $ lines s'
  putStr $ unlines $ map judge s