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