AtCoder Regular Contest 104
A
Plus Minus
AtCoder
⌀ 0
原题
←B →
翻译中…

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$.

翻译中…

样例

Input #1
2 -2
Output #1
0 2
If $X = 0$ and $Y = 2$, they match the situation: $0 + 2 = 2$ and $0 - 2 = -2$.
Input #2
3 1
Output #2
2 1
题目信息
题号
arc104_a
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。