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