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