s = int(input()) t = int(input()) if s > 4 and t > 4: print("YES") else: print("NO")