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