|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초 (추가 시간 없음)||512 MB||9||5||5||55.556%|
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.
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.