The Hamiltonian equations of the motion of a system of N ideal point vortices in a simply connected two-dimensional region have been obtained by the methods of the theory of functions of a complex variable. It is shown that the motion of two vortices in a circle is integrated exactly; the periods of this motion have been determined. The motion of two vortices in a region bounded by a lemniscate has been investigated by the method of secant planes in the phase space. The stochastic trajectories have been revealed here, which have continuous power spectra. The sup-posed reason for stochasticity is the walk of the phase point over a homoclinic structure.