Kile and Pogi found N banknotes on the street. After making sure that the owner was nowhere to be found, they decided to split the banknotes between themselves.
Both of them want to end up with the same amount, so they split the banknotes into two groups of equal total value. Among all such splits they choose one where the total value of the banknotes nobody takes is as small as possible.
They could not leave the remaining banknotes on the street, so they went to a nearby casino and bet all of that money on red. The roulette stopped on 13, and this time the bet won. The casino pays out twice the amount that was bet. The payout is always an even number of kuna, so the two of them split it into two equal halves.
Print how much money each of them takes home.