201040: [AtCoder]ARC104 A - Plus Minus

Memory Limit:1024 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Score : $100$ points

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.

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.

Input

Input is given from Standard Input in the following format:

$A$ $B$

Output

Print $X$ and $Y$.


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

题意翻译

高桥君有两个数 $x$ 和 $y$,他计算了它们的和($x+y$)$A$ 和差($x-y$)$B$。现在他忘记了 $x$ 和 $y$。请你帮他求出原来的 $x$ 和 $y$。

加入题单

上一题 下一题 算法标签: