n = int(input()) x,y = map(int,input().split()) print("YNeos"[x!=1 and y!=1 and x!=y::2])