n = readline.to_i
h = readline.split.map!(&:to_i)
sorted_h = h.sort
max_num = sorted_h[n-1]
flg = true
(n-1).times do |i|
  if h[i] > (max_num - 1) then
    flg = false
    break
  end
end

if flg === false then
  print("No")
else
  print("Yes")
end
