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