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