import Control.Monad
type Vect = (Double, Double)

threshold :: Double
threshold = 0.0000001

isOrthog :: Vect -> Vect -> Bool
isOrthog (x0,y0) (x1,y1) = abs (x0*x1+y0*y1) < threshold

parseLn :: [Double] -> (Vect, Vect)
parseLn [xa,ya,xb,yb,xc,yc,xd,yd] = ((xb-xa,yb-ya),(xd-xc,yd-yc))

main = getContents >>=
    mapM_ (\l -> unless (null l) $
                putStrLn . (\b -> if b then "YES" else "NO")
                    . uncurry isOrthog . parseLn . map read . words
                    $ l) . lines