s = int(input()) t = int(input()) if s < 5 or t > 5: print("YES") else: print("NO")