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