{-# OPTIONS_GHC -Wall -Werror #-}

import Control.Applicative ((<$>))
import Control.Monad (replicateM_)

isParallel ::(Eq a, Num a) => (a, a) -> (a, a) -> String
isParallel (ax, ay) (bx, by) = if ax * by - ay * bx == 0
                                  then "YES"
                                  else "NO"

solve :: (Eq a, Num a) => [a] -> String
solve xs = isParallel a b
  where x1:y1:x2:y2:x3:y3:x4:y4:_ = xs
        a = (x2 - x1, y2 - y1)
        b = (x4 - x3, y4 - y3)

main :: IO ()
main = do
  n <- readLn
  replicateM_ n $ do
    x <- (map read) <$> words <$> getLine :: IO [Float]
    putStrLn $ solve x