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