Problem4489--数人数

4489: 数人数

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

一个班级里,男生比女生多 lns="http://www.w3.org/1998/Math/MathML">a 人,当男生和女生各自离开 lns="http://www.w3.org/1998/Math/MathML">b 个人后,男生数量是女生的两倍。

给定 lns="http://www.w3.org/1998/Math/MathML">a 与 lns="http://www.w3.org/1998/Math/MathML">b,请计算原来男生女生各有多少人?

Input

  • 第一行:单个整数 lns="http://www.w3.org/1998/Math/MathML">a,表示开始时男生比女生多 lns="http://www.w3.org/1998/Math/MathML">a 人;
  • 第二行:单个整数 lns="http://www.w3.org/1998/Math/MathML">b,表示男生和女生同时调走 lns="http://www.w3.org/1998/Math/MathML">b 个人。

Output

  • 第一行:一个整数,表示原来有多少男生;
  • 第二行:一个整数,表示原来有多少女生。

Sample Input Copy

1
1

Sample Output Copy

3
2

Source/Category