n=gets.chomp.to_i
array=gets.chomp.split(' ').map(&:to_i)
if n == 1
  kq = true
else
  (0..array.length-2).each do |i|
    (i+1..array.length-1).each do |j|
      kq = false if array[i] - array[j] > 1
    end
  end
end
str = kq ? "Yes" : "No"
puts str