P26181 [AtCoder] Plus Minus
入门
题目描述

Problem Statement

Takahashi has two integers X and Y.
He computed X + Y and X - Y, and the results were A and B, respectively.
Now he cannot remember what X and Y were. Find X and Y for him.

Input

Input is given from Standard Input in the following format:
A B

Output

Print X and Y.

Constraints

  • -$100 \leq A, B \leq 100$
  • For the given integers A and B, there uniquely exist integers X and Y such that X + Y = A and X - Y = B.
  • All values in input are integers.

Sample Input 1

2 -2

Sample Output 1

0 2

If X = 0 and Y = 2, they match the situation: 0 + 2 = 2 and 0 - 2 = -2.

Sample Input 2

3 1

Sample Output 2

2 1

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
2 -2
样例输出
0 2