module Vector =
  struct
    type t = { x: float; y: float }
    let eps = 1e-10
    let set x y = {x = x; y = y}
    let add v1 v2 = {x = v1.x +. v2.x; y = v1.y +. v2.y}
    let sub v1 v2 = {x = v1.x -. v2.x; y = v1.y -. v2.y}
    let mul v a = {x = v.x *. a; y = v.y *. a}
    let div v a = {x = v.x /. a; y = v.y /. a}
    let norm v = v.x *. v.x +. v.y *. v.y
    let abs v = sqrt (norm v)
    let dot v1 v2 = v1.x *. v2.x +. v1.y *. v2.y
    let cross v1 v2 = v1.x *. v2.y -. v1.y *. v2.x
  end

let _ =
  try
    while true do
      let v1, v2 = Scanf.scanf "%f %f %f %f %f %f %f %f\n" (fun xa ya xb yb xc yc xd yd -> (Vector.sub (Vector.set xb yb) (Vector.set xa ya)), (Vector.sub (Vector.set xd yd) (Vector.set xc yc))) in
      Printf.printf "%s\n" (if abs_float (Vector.dot v1 v2) < Vector.eps then "YES" else "NO")
    done
  with
    End_of_file -> ()