data Vec2 = Vec2 Double Double deriving Eq

(/--) :: Vec2 -> Vec2 -> Vec2
(/--) (Vec2 a1 a2) (Vec2 b1 b2) = (Vec2 (a1 - b1) (a2 - b2))

-- Cross Product
(/**) :: Vec2 -> Vec2 -> Double
(/**) (Vec2 a1 a2) (Vec2 b1 b2) = a1 * b2 - a2 * b1

isParallel :: [Double] -> String
isParallel [x1, y1, x2, y2, x3, y3, x4, y4] = if abs p < 0.0000001 then "YES" else "NO"
    where
        vab = (Vec2 x2 y2) /-- (Vec2 x1 y1)
        vcd = (Vec2 x4 y4) /-- (Vec2 x3 y3)
        p = vab /** vcd

main :: IO ()
main = do
    _ <- getLine
    interact (unlines . map isParallel . map (map read) . map words . lines)