s = int(input()) t = int(input()) if s < 1 and t < 2: print("YES") else: print("NO")