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