import Control.Monad

data Point = P {x :: Double, y :: Double}
point x y = P x y

main = do
    n <- readLn
    dataSet <- replicateM n (fmap (map read.words) getLine)
    mapM_ (yesOrNo.isParallel) dataSet

yesOrNo a = if a then putStrLn "YES"
                 else putStrLn "NO"

isParallel :: [Double] -> Bool
isParallel [x1,y1,x2,y2,x3,y3,x4,y4]
  | underEps (x2 - x1) = underEps (x4 - x3)
  | otherwise = underEps (grad1 - grad2)
  where grad1 = (y2 - y1) / (x2 - x1)
        grad2 = (y4 - y3) / (x4 - x3)

underEps n = abs n < eps
eps = 0.000001

