s = int(input()) t = int(input()) if s > 8 or t > 8: print('YES') else: print('NO')