시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 (추가 시간 없음) 512 MB 0 0 0 0.000%

문제

You are an architect and you have just been appointed to build a new swimming hall. The organisation behind these plans has acquired funding for a swimming pool and surrounding building as large as they want, but unfortunately they could not find anyone willing to pay for the floor surrounding the pool. They decided to pay for the floor tiles out of their own pocket. Because this has already cost them an arm and a leg, they want you to use all the floor tiles in your proposed plan.

Being an architect, you care for aesthetics. You see it as absolutely vital that both the swimming pool and the surrounding building are perfect squares. This raises an interesting problem: how can you make sure that the square shapes are guaranteed, while still using all the floor tiles the organisation bought?

Given the number of tiles n, find the length of the side of the building m and and the length of the side of the pool k such that n = m2 − k2, or print impossible if no suitable m and k exist.

입력

  • One line containing a single integer 1 ≤ n ≤ 109.

출력

Print two non-negative integers m, k such that n = m2 − k2, or print impossible if no such integers exist. If there are multiple valid solutions, you may output any one of them.

예제 입력 1

7

예제 출력 1

4 3

예제 입력 2

10

예제 출력 2

impossible

예제 입력 3

15

예제 출력 3

4 1