data Vec2 = Vec2 Double Double deriving Eq

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

(/..) :: Vec2 -> Vec2 -> Double
(/..) (Vec2 a1 a2) (Vec2 b1 b2) = a1 * b1 + a2 * b2

areOrthogonal :: [Double] -> String
areOrthogonal [xa, ya, xb, yb, xc, yc, xd, yd]
    | abs (ba /.. dc) < 0.0000001 = "YES"
    | otherwise           = "NO"
    where
        ba = (Vec2 xb yb) /-- (Vec2 xa ya)
        dc = (Vec2 xd yd) /-- (Vec2 xc yc)

main :: IO ()
main = putStr . unlines . map areOrthogonal . map (map read) . map words . lines =<< getContents