import Control.Monad
import Control.Applicative
import Data.Functor
import Data.Function
import Data.Monoid
import Data.Maybe
import Data.List
import Data.Foldable (foldMap)
import Data.List.Split
import Data.Char
import Data.Ratio
import Data.Ord
import Data.Array.IO
 
readInt = read :: String -> Int
readDouble = read :: String -> Double
getInt = readLn :: IO Int
getInts = map readInt . words <$> getLine
sjoin :: (Show a) => [a] -> String
sjoin = unwords . map show
cond :: a -> a -> Bool -> a
cond t f c = if c then t else f
-- end of templete

f [xa,ya,xb,yb,xc,yc,xd,yd] = if abs (dx1 * dx2 + dy1 * dy2) < 1e-9 then "YES" else "NO"
  where
    dx1 = xb - xa
    dy1 = yb - ya
    dx2 = xd - xc
    dy2 = yd - yc

main = map (f . map readDouble . words) . lines <$> getContents >>= mapM_ putStrLn