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