program geonowe
implicit none
integer :: a,b,c,i

read(*,*) a,b,c

do i = 1, b
	if ( mod(a*i,b) == c ) then
		write(*,'(a)') 'YES'
        stop
    end if
end do
write(*,'(a)') 'NO'
stop

end program geonowe