# -*- coding: utf-8 -*-
"""
Created on Sun Jun 14 17:34:27 2020

@author: NEC-PCuser
"""

N = int(input())
a = list(map(int, input().split()))
a.sort()
j = 0
ans = "Yes"
for i in range(len(a)):
    if i != j:
        ans = "No"
        break
    j += 1

print(ans)