main = interact $ unlines . map (orthogonal . map (read::String->Double) . words) . lines
orthogonal [xa,ya,xb,yb,xc,yc,xd,yd] = if equal' (ab + cd) bd then "YES" else "NO"
 where
  ab = (yb-ya)^2 + (xb-xa)^2
  cd = (yd)^2 + (xd-xc)^2
  bd = ((xd-xc)-(xb-xa))^2 + ((yd)-(yb-ya))^2
equal' x y = abs (x-y) < 0.000001