s = int(input()) k = int(input()) if s < 8 and k < 8: print("ДА") else: print("НЕТ")