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