Ivica has set up a new parquet flooring in his room. The room is
The blocks are of quadratic shape and each has an area of one quadratic decimeter. Once Ivica had set up the flooring, which consists of brown-colored blocks, he decided to paint the blocks on the edge of the room red.
The picture below illustrates the scenario from test case #
Marica has come to visit Ivica. While Ivica was serving her cookies, she counted the number of blocks of each color. When she returned home, she recalled the two numbers and wished to calculate the dimensions of Ivica's room. Help her!
Input Specification
The first and only line of input contains two integers separated by a space,
Output Specification
The first and only line of output must contain the dimensions of the room,
Scoring
In test cases worth
Sample Input 1
8 1
Sample Output 1
3 3
Sample Input 2
10 2
Sample Output 2
4 3
Sample Input 3
24 24
Sample Output 3
8 6
Comments