program main
	implicit none
	integer i, S
	integer(8) N, Nh
	read(*, *) N
	Nh = N
	S = 0
	do i = 1, 10
		S = S + mod(N, 10)
		N = N / 10
		if(N < 10) then
			S = S + N
			exit
		end if
	end do
	if(mod(Nh, S) == 0) then
		write(*, *) 'Yes'
	else
		write(*, *) 'No'
	end if
end program main