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