#!/usr/bin/env ruby

def rad(x, y, x2, y2)
  Math.atan2(y2-y, x2-x) * 180 / Math::PI
end

while line = gets
  xa, ya, xb, yb, xc, yc, xd, yd = line.chomp!.split.map(&:to_f)

  puts ((rad(xa, ya, xb, yb) - rad(xc, yc, xd, yd)).abs.to_i == 90) ? "YES" : "NO"
end