n = read_line.to_i a = read_line.split.map(&.to_i64).sort puts n.times.all? { |i| a[i] <= i + 1 } ? "Yes" : "No"