N = int(input()) N8 = N % 8 if N8 == 0 or N == 7: print("Yes") else: print("No")