n = int(input()) print("Yes" if n%8 in {0,7} else "No")