LearnPy Hub
← Arena
IntermediateRating 1300

Fair Candy Swap

Alice and Bob each have some candy boxes. They swap exactly one box each so that both end up with the same total. Print the box Alice gives and the box Bob gives (if there are several answers, the one where Alice's box is smallest). An answer always exists.

Input

Alice's boxes on one line, Bob's on the next.

Output

Two integers.

Sample 1

Input
1 1
2 2
Output
1 2

Sample 2

Input
1 2
2 3
Output
1 2
solution.py
Output appears here
Fair Candy Swap · Python Arena problem · LearnPy Hub