import Control.Applicative ((<$>), (<*>))
import Control.Monad
import Data.List

main :: IO ()
main = do
  xs <- getc $ split toDbl
  mapM_ putStrLn $ solve xs

solve :: [[Double]] -> [String]
solve = map $ (\b -> if b then "YES" else "NO") . isOrthogonal

isOrthogonal :: [Double] -> Bool
isOrthogonal [xa, ya, xb, yb, xc, yc, xd, yd] = abs (dot v1 v2) < eps 
  where v1 = toVect (Point xa ya) (Point xb yb)
        v2 = toVect (Point xc yc) (Point xd yd)
        
toDbl :: String -> Double
toDbl s = read s

split :: (String -> a) -> String -> [a]
split f = map f . words

getc :: (String -> a) -> IO [a]
getc f = map f . lines <$> getContents

eps :: Double
eps = 1e-9

data Point = Point {xop :: Double, yop :: Double} deriving Show
data Vect = Vect {xov :: Double, yov :: Double} deriving Show
 
dot :: Vect -> Vect -> Double
dot v1 v2 = xov v1 * xov v2 + yov v1 * yov v2

toVect :: Point -> Point -> Vect
toVect p1 p2 = Vect (xop p2 - xop p1) (yop p2 - yop p1)