407208: GYM102697 179 Engineering Challenge
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
179. Engineering Challengetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output This problem is worth 5 points.
For an engineering challenge, you have to make a project which has a certain height $$$n$$$, with a tolerance of $$$k$$$. This means that any height between $$$n$$$ - $$$k$$$ and $$$n$$$ + $$$k$$$ will be acceptable. For example, if $$$n$$$ was equal to 5, and $$$k$$$ was equal to 2, any height between 3 and 7, inclusive, would be acceptable.
Given these values $$$n$$$ and $$$k$$$, figure out the lower and upper height limit for the engineering project.
InputThe input consists of two lines: positive integers $$$n$$$ and $$$k$$$, each on separate lines.
OutputOutput two lines. On the first line, output the lower height limit, as described above. On the second line, output the upper height limit, as described above.
ExamplesInput5 2Output
3 7Input
7 3Output
4 10Input
8 4Output
4 12