input();A=list(map(int,input().split()));print("NYoe s"[0 in A or 1 in A::2])