E. Gliese-581g
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Deep-space explorers on Gliese-581g have recovered multiple ancient alien data cores. Its security protocol uses a folding 64-bit hash to verify user identities.

The hash will take in an unsigned $$$64$$$-bit integer $$$x$$$, that is, an integer in the range $$$0 \le x \lt 2^{64}$$$.

First define $$$$$$ p(x)=\operatorname{rotl}_{64}(Mx+C,23), $$$$$$ where all arithmetic on $$$64$$$-bit integers is performed modulo $$$2^{64}$$$, and $$$$$$ M=\texttt{0x9E3779B97F4A7C15}, \qquad C=\texttt{0xD1B54A32D192ED03}. $$$$$$

Then define the hash $$$$$$ h(x)=\operatorname{lo}_{32}(p(x)) \oplus \operatorname{hi}_{32}(p(x)). $$$$$$

In the formulas above:

  • $$$\operatorname{rotl}_{64}(y,r)$$$ means to rotate the $$$64$$$-bit binary representation of $$$y$$$ to the left by $$$r$$$ positions;
  • $$$\operatorname{lo}_{32}(y)$$$ means the lower $$$32$$$ bits of $$$y$$$, equivalently $$$$$$ \operatorname{lo}_{32}(y)=y \bmod 2^{32}; $$$$$$
  • $$$\operatorname{hi}_{32}(y)$$$ means the upper $$$32$$$ bits of $$$y$$$, equivalently $$$$$$ \operatorname{hi}_{32}(y)=\left\lfloor \frac{y}{2^{32}} \right\rfloor; $$$$$$
  • $$$\oplus$$$ denotes bitwise XOR.

You will be given $$$q$$$ test cases in which you will try to break the data core's hash function.

For each test case, you are given a target unsigned $$$32$$$-bit integer $$$t$$$, that is, an integer in the range $$$0 \le t \lt 2^{32}$$$.

Output two distinct unsigned $$$64$$$-bit integers $$$a$$$ and $$$b$$$ such that the hashed values collide with each other on $$$t$$$. In other words, $$$$$$ h(a)=h(b)=t. $$$$$$

Any valid answer will be accepted.

Input

The first line contains a single integer $$$q$$$ $$$(1 \le q \le 2\cdot 10^5)$$$, the number of test cases.

Each of the next $$$q$$$ lines contains one integer $$$t$$$ $$$(0 \le t \lt 2^{32})$$$.

Output

For each test case, print two distinct integers $$$a$$$ and $$$b$$$ $$$(0 \le a,b \lt 2^{64})$$$ such that $$$$$$ h(a)=h(b)=t. $$$$$$

If there are multiple valid answers, print any.

Example
Input
1
587262709
Output
8878460273963937783 14508321764111559159
Note

As an example, $$$h(10)=\texttt{0x521ACDE7}=1377488359$$$.