{-# LANGUAGE OverloadedStrings #-}
import Data.Complex (Complex (..), conjugate, realPart)
import qualified Data.Text as T
import qualified Data.Text.IO as T

-- AB??\CD??????????????????????????¢??°
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)

-- Python?????????????????????????????°????????¢??????????????¨????§?????????????????????¢??°
-- http://stackoverflow.com/questions/32553370/how-do-i-unpack-a-list-as-individual-arguments-in-haskell ????????\???
uncurry4 :: (a -> b -> c -> d -> e) -> ((a, b, c, d) -> e)
uncurry4 f (a, b, c, d) = f a b c d

-- ??\????????????4????????§?¨?????????\?????????????????¨???????´???°???4-???????????????????????¢??°
-- ?±???¨??§????????¨????????????
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 = T.interact $ T.unlines . map (\b -> if b then "YES" else "NO") .
    map (uncurry4 areOrthogonal) . map convert . map (map (read . T.unpack)) . map T.words . T.lines