Under construction

Still being built. Things may change

Do You Know Your ABCs?

Interview

Time limit1sMemory limit512 MB

Summary
Given seven numbers that are A, B, C and their pairwise and total sums in some order, recover the three sorted positive integers.
Level

Easy3 of 10

Topics
Sorting, Math, Implementation
Solved
No attempts yet

Problem

Farmer John's cows hold a daily online gathering on the "mooZ" video meeting platform. For fun, they have invented a simple number game to play during the meeting.

Elsie has three positive integers AA, BB, and CC (A≤B≤CA\le B\le C). These integers are supposed to be secret, so she will not tell them directly to her sister Bessie. Instead, she gives Bessie seven integers in the range 1…1091 \ldots 10^9 (not necessarily distinct), claiming that they are AA, BB, CC, A+BA+B, B+CB+C, C+AC+A, and A+B+CA+B+C in some order.

Given these seven numbers, help Bessie determine AA, BB, and CC. The answer is unique.

Input

The only line of input contains seven space-separated integers.

Output

Print AA, BB, and CC, separated by spaces.

Examples1

  1. Example 1

    Input
    2 2 11 4 9 7 9
    
    Expected output
    2 2 7