import Control.Applicative
import Control.Monad

solve = do
  input <- fmap (read :: String -> Double) . words <$> getLine
  isParallel input

isParallel (x1:y1:x2:y2:x3:y3:x4:y4:y4s) = do
  if (y1 - y2) / (x1 - x2) == (y3 - y4) / (x3 - x4)
    then putStrLn "YES"
    else putStrLn "NO"

main = do
  n <- readLn
  replicateM n solve