eolymp
bolt
Try our new interface for solving problems
Problems

Championship on fungi Sports

Championship on fungi Sports

In Sunday's championship was held in Kharkov, student teams on collecting fungi in snowy areas. Five students of a profile on the eve of the university decided to train in the park. Training was held ten laps, during each of which two students for an hour to collect mushrooms. In addition, each student ran in tandem with each exactly once. At the disposal of coach now has ten numbers - the number of fungi collected by each pair of students one hour search. He made ​​the following suggestion: perhaps an hour, each student collects strictly defined non-negative number of fungi, as a result of two students - nothing less than the sum of their results, there is work in a pair does not interfere and does not help. Determine whether the hypothesis of a coach to be true, and if so, to determine the results of all five students, if they were running on one. \InputFile In the input file contains ten integers in the interval from \textbf{0} to \textbf{10^6}. This is the number of fungi collected by pairs of students during the race. Of the order of the numbers is not known. \OutputFile The output file output the word "\textbf{WRONG}", if the hypothesis of a coach just wrong. Otherwise, output the five lines with the results of students' lone non-decreasing order.
Time limit 0.5 seconds
Memory limit 256 MiB
Input example #1
11
101
110
1001
1010
1100
10001
10010
10100
11000
Output example #1
1
10
100
1000
10000
Author Michael Dworkin
Source Winter School, Kharkov, 2011, Day 3