- محدودیت زمان: ۱ ثانیه
- محدودیت حافظه: ۲۵۶ مگابایت
Pari has set up a new parquet flooring for her room. Her room is $W$ meters wide and $L$ meters long.
The blocks are of quadratic shape and each has an area of one quadratic meter. Once Pari had set up the flooring, which consists of yellow-colored blocks, she decided to paint the blocks on the edge of the room black.
The picture above illustrates the floor from the test case #2 – outer blocks are black, while the remaining two inner blocks are yellow.
Mari has come to visit Pari. While Pari was serving her biscuits, she counted the number of blocks of each color. When Mary returned home, she recalled of the two numbers and wished to calculate the dimensions of Pari’s room. Help her!
ورودی
The first and only line of input contains two integers separated by a space, $R$ (the number of black blocks) and $B$ (the number of yellow blocks).
$$8 \le R \le 5000$$ $$1 \le B \le 2\ 000\ 000$$
خروجی
The first and only line of output must contain the dimensions of Pari's room, $L$ and $W$, respectively. If the numbers differ, output the bigger one first. The test data is designed to somehow ensure that a unique solution always exists.
مثال
ورودی نمونه ۱
8 1
خروجی نمونه ۱
3 3
ورودی نمونه ۲
10 2
خروجی نمونه ۲
4 3
ورودی نمونه ۳
24 24
خروجی نمونه ۳
8 6
ارسال پاسخ برای این سؤال