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