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] = dy1 * dx2 == dy2 * dx1
  where dx1 = x2 - x1
        dy1 = y2 - y1
        dx2 = x4 - x3
        dy2 = y4 - y3


underEps n = abs n < eps
eps = 0.000001

