program main
	implicit none
    integer A, B, C, S, i
	read(*, *) A, B, C
	S = 0
	do i = 1, 100000000
		S = S + A
		if(mod(S, B) == C) then
			write(*, *) 'YES'
			S = -1
			exit
		end if
	end do
	if(S /= -1) then
		write(*, *) 'NO'
	end if
end program main