P9955 [USACO20DEC] Do You Know Your ABCs? B

Description

Farmer John’s cows are holding their daily meeting on the "mooZ" video conferencing platform. They invented a simple number game to make the meeting more fun. Elsie has three positive integers $A$, $B$, and $C$ ($A\le B\le C$). These numbers are secret, and she will not tell them directly to her sister Bessie. She tells Bessie seven integers in the range $1\ldots 10^9$ (not necessarily distinct), claiming that they are some permutation of $A$, $B$, $C$, $A+B$, $B+C$, $C+A$, and $A+B+C$. Given these seven integers, help Bessie find $A$, $B$, and $C$. It can be proven that the answer is unique.

Input Format

Input one line containing seven space-separated integers.

Output Format

Output $A$, $B$, and $C$, separated by spaces.

Explanation/Hint

### Subtask Properties - Subtasks $2-3$ satisfy $C\le 50$. - Subtasks $4-10$ have no additional constraints. Translated by ChatGPT 5