readlines.each do |input|
  ax, ay, bx, by, cx, cy, dx, dy = input.split.map(&:to_f)

  if (bx - ax).zero? || (dx - cx).zero?
    puts 'YES'
    next
  end

  ab_slope = (by - ay) / (bx - ax)
  cd_slope = (dy - cy) / (dx - cx)

  puts (ab_slope * cd_slope == -1) ? 'YES' : 'NO'
end