readlines.each{|line|
  xa, ya, xb, yb, xc, yc, xd, yd = line.split.map(&:to_f)
  v1 = [xb - xa, yb - ya]
  v2 = [xd - xc, yd - yc]
  if (v1[0] * v2[0] + v1[1] * v2[1]).abs <= 1e-12
    puts "YES"
  else
    puts "NO"
  end
}