#B3914. Cookie Distribution

    ID: 11571 Type: Default 1000ms 256MiB

Cookie Distribution

In the final exam held by Luogu Online School, the students achieved excellent results. In the exam, student Z ranked first while student yz ranked second. As a reward, the teacher decided to give them boxes of cookies without breaking any box. The teacher bought three boxes containing aa, bb, and cc cookies respectively. The cookies must be distributed between Z and yz, meaning each box is given intact to one of the two. The conditions for distribution are:

  1. Let the number of cookies given to Z be SZS_Z and to yz be SyzS_{yz}. Then, SZSyzS_Z \geq S_{yz}.
  2. Among all distributions satisfying condition (1), the difference SZSyzS_Z - S_{yz} should be minimized.

Determine the number of cookies each student receives.

inputFormat

The input consists of a single line containing three positive integers aa, bb, and cc (each representing the number of cookies in one box), separated by spaces.

outputFormat

Output two integers separated by a space: the first is the number of cookies received by Z and the second is the number of cookies received by yz.

sample

1 5 3
5 4