n=io.read("*n")
h={}
for i=1,n do
    h[i]=io.read("*n")
end
hmin=10^9+1
hmax=0
for i=1,n-1 do
    hmax=math.max(hmax, h[i])
    hmin=math.min(hmin, h[i])
end
if hmax-hmin>=2 then
    print("No")
else
    print("Yes")
end