# Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Today is the 16th December, a red letter day of our national history. The whole country equipped with red-green flags. Unlike every year, Afia can’t go out to celebrate the day in this year, because she has an important exam ‘Computer Interfacing’ in the next day. But, she really wants to do at least something to make the day special. She has a large piece of green cloth and also a piece of red cloth. She wants to make a large national flag to fly it on the house roof. Before this, she may need to cut the cloth to give it our national flag shape. We know, our national flag is bottle green in color and rectangular in size in the proportion of 10:6, with a red circle in the middle. (Fig: A, B)
Suppose, Afia has a rectangular piece of green cloth which length is **x** meters and width is **y** meters. She is agreed to cut exactly **d** meters (possibly zero) from length and same **d** meters from width of the rectangular piece so that remaining part maintain the correct ratio of our national flag (10 : 6). (see Fig: C for more details) She is not yet concern about the red circle in the middle.
As she is busy with her study for exam, your task is to help her to determine the new generated **x’** and **y’** after cutting **d** meters from both side. Remember, she always wants to get largest possible flag and you have a normal scale by which you can calculate only the integer value (in meters), not fractional value. Print **‘Not possible’**, if it is not possible to obtain the ratio of our national flag that already mentioned above.

Input contains two space separated integers **x** and **y** as described above. **(1 ≤ X ≤ 10 ^{15}, 1 ≤ Y ≤ 10^{15})**

If it is possible to obtain the ratio **x’ : y’ = 10 : 6** , print **x’** and **y’** (separated by a space), as described above. Print “Not possible” (without quotes) otherwise.

Input | Output |
---|---|

12 10 | 5 3 |

59% Solution Ratio

Mr_BangladeshEarliest,

Mr_BangladeshFastest, 0.0s

ramisa.alamLightest, 0 B

CodingmasterShortest, 112B

Login to submit