Problem C. Conscientiously counted waffels

Author:N. Grebenyuk   Time limit:1 sec
Input file:Standard input   Memory limit:256 Mb
Output file:Standard output  

Statement

Group of n scientists returned to their camp quite late. They were so tired so they didn't eat any of their m waffles.

However during the night every scientist woke up once, all at different time. Everyone thought that he woke up first, because all the rest were asleep, so if at the moment there were x waffles, he thought that he is allowed to eat xn waffles. In case xn was not an integer, a scientist could round it up or down, depending on how hungry he was. So every scientist ate ⌊ xn or ⌈ xn waffles, where x is the number of remaining waffles at the moment he woke up.

At the morning remained k waffles, after every scientist woke up during the night. Nobody remembers, neither when he woke, nor how many waffles were there at this moment, nor how hungry he was. They were interested, what could be minimal mmin and maximal mmax number of waffles in the beginning?

Notice that it's possible, that some scientists ate zero waffles.

Input format

The first line contains two integers n and k.

Output format

Print two space separated integers — mmin and mmax.

Constraints

2 ≤ n ≤ 105

1 ≤ k ≤ 109

Sample tests

No. Standard input Standard output
1
7 9
19 32
2
21 39
90 127
3
937 1045684
2843161 2844778

0.088s 0.009s 13