import Data.Maybe
import Control.Applicative
import Control.Monad

type Vector = (Double, Double)
data YesNo = YES | NO deriving (Show)

toVector :: [Double] -> [Maybe Vector]
toVector [] = []
toVector (x1:y1:x2:y2:xs) = Just (x2-x1, y2-y1) : toVector xs
toVector [_] = [Nothing]
toVector [_, _] = [Nothing]
toVector [_, _, _] = [Nothing]

isOrthogonal :: Vector -> Vector -> YesNo
isOrthogonal (x1, y1) (x2, y2) =
  if x1 * x2 + y1 * y2 == 0.0 then YES
    else NO

solver :: [Vector] -> [YesNo]
solver [] = []
solver (a:b:xs) = isOrthogonal a b : solver xs
solver [_] = []

main :: IO()
main = do
  contents <- map (map (read :: String -> Double) . words) . lines <$> getContents
  let vList = catMaybes $ concatMap toVector contents
  mapM_ print $ solver vList