# n = gets.chop!
# str = gets.split
str = ["1", "4", "3"]

str.map!{|s| s.to_i}
# array = array.map{|n| n.to_i}

def test(st)
    check = "yes"
for e in 1...st.length
    if st[e] < st[e-1]
        check = "no"
    elsif st[e] - 1 >= st[e-1]
        st[e] = st[e] - 1
    end
end

    return check
end

print test(str)