N=int(input()) A=list(map(int,input().split())) if A.count(0)==N:print("Yes") elif A.count(1)>0:print("Yes") else:print("No")