2 つの整数 A, B が与えられる. A+B, A-B の中で最大の値と最小の値を順に出力せよ.
Input
入力は以下の形式で標準入力から与えられる.
A B
Output
出力は 2 行からなる.
1 行目に, A+B, A-B の中で最大の値を出力せよ.
2 行目に, A+B, A-B の中で最小の値を出力せよ.
Constraints
-100 ≦ A ≦ 100 .
-100 ≦ B ≦ 100 .
Example 1
Input
-2 1
Output
-1 -3
Example 2
Input
-3 -4
Output
1 -7
Example 3
Input
5 0
Output
5 5
Discussion
Threads about this problem. Spoilers are collapsed; wrap hints in
||double bars||.No discussion yet. Start a thread if something here needs explaining.