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