import Data.Complex (Complex (..), conjugate, realPart)

areOrthogonal :: (Ord a, RealFloat a) => Complex a -> Complex a -> Complex a -> Complex a -> Bool
areOrthogonal a b c d = (eps >) $ realPart . abs $ v1 * conjugate v2 + conjugate v1 * v2
    where
        v1 = b - a
        v2 = d - c
        eps = 10.0 ** (-12)

uncurry4 :: (a -> b -> c -> d -> e) -> ((a, b, c, d) -> e)
uncurry4 f (a, b, c, d) = f a b c d

convert :: (Ord a, RealFloat a) => [a] -> (Complex a, Complex a, Complex a, Complex a)
convert (xa : ya : xb : yb : xc : yc : xd : yd : _) = (xa :+ ya, xb :+ yb, xc :+ yc, xd :+ yd)

main = putStr . unlines . map (\b -> if b then "YES" else "NO") .
    map (uncurry4 areOrthogonal) . map convert .
        map (map (read :: String -> Double)) . map words . lines =<< getContents