eolymp
bolt
Try our new interface for solving problems
Problems

Do You Know Your ABCs?

Do You Know Your ABCs?

Farmer John's cows have been holding a daily online gathering on the "mooZ" video meeting platform. For fun, they have invented a simple number game to play during the meeting to keep themselves entertained. Elsie has three positive integers $a, b$ and $c~(a \le b \le c)$. These integers are supposed to be secret, so she will not directly reveal them to her sister Bessie. Instead, she gives Bessie seven (not necessarily distinct) integers in the range $1 ... 10^9$, claiming that they are $a, b, c, a + b, b + c, c + a$ and $a + b + c$ in some order. Given a list of these seven numbers, help Bessie determine $a, b$ and $c$ It can be shown that the answer is unique. \InputFile Seven integers. \OutputFile Print $a, b$ and $c$.
Time limit 1 second
Memory limit 128 MiB
Input example #1
2 2 11 4 9 7 9
Output example #1
2 2 7
Source 2020 USACO December, Bronze