A classic straightedge-and-compass construction uses only an unmarked straightedge and a compass. Because a compass is available, any integer multiple of the unit length (length $1$) is easy to construct, and we can go further and construct the square root of any natural number.
For example, suppose we want to construct a segment of length $\sqrt{33}$. First pick a point $X$ on a horizontal line and construct a segment of length $4$ that is perpendicular to the line and has $X$ as one endpoint. Call the other endpoint $H$. Now draw a circle of radius $7$ centered at $H$; if $Y$ is one of the points where this circle meets the horizontal line, then by the Pythagorean theorem the segment $XY$ has length $\sqrt{7^2 - 4^2} = \sqrt{33}$.
Using this method we want to construct a segment of length $\sqrt{N}$. That is, we must choose a non-negative integer segment length $a$ and a non-negative integer circle radius $r$ such that $r^2 - a^2 = N$. If several pairs $(a, r)$ work, use the one with the smallest segment length $a$. (The segment length $a$ may be $0$.)
The first line contains the number of test cases $T$. Each of the next $T$ lines contains one integer $N$ ($1 \le N \le 10^9$).
For each test case, print on one line two non-negative integers: the segment length $a$ and the circle radius $r$, separated by a space. If several pairs $(a, r)$ satisfy the condition, print the one with the smallest segment length $a$. If no such pair exists, print IMPOSSIBLE.