  Consider two insurance companies (or two branches of the same company) that
receive premiums at different rates and then split the amount they pay in fixed
proportions for each claim (for simplicity we assume that they are equal). We
model the occurrence of claims according to a Poisson process. The ruin is
achieved when the corresponding two-dimensional risk process first leaves the
positive quadrant. We will consider two scenarios of the controlled process:
refraction and impulse control. In the first case the dividends are payed out
when the two-dimensional risk process exits the fixed region. In the second
scenario, whenever the process hits the horizontal line, it is reduced by
paying dividends to some fixed point in the positive quadrant where it waits
for the next claim to arrive. In both models we calculate the discounted
cumulative dividend payments until the ruin. This paper is the first attempt to
understand the effect of dependencies of two portfolios on the joint optimal
strategy of paying dividends. For example in case of proportional reinsurance
one can observe the interesting phenomenon that choice of the optimal barrier
depends on the initial reserves. This is in contrast with the one-dimensional
Cram\'{e}r-Lundberg model where the optimal choice of the barrier is uniform
for all initial reserves.
