# frozen_string_literal: true

def gudge(arr)
  until arr.empty?
    pointer = arr.shift
    return false if arr.any? { |e| pointer - e > 1 }
  end
  true
end

STDIN.gets
input_h = STDIN.gets.split.map(&:to_i)
puts gudge(input_h) ? 'Yes' : 'No'
