A robot is initially at $(0,0)$ on the cartesian plane. It can move in 4 directions - up, down, left, right denoted by letter u, d, l, r respectively. More formally:
- if the position of robot is $(x,y)$ then u makes it $(x,y+1)$
- if the position of robot is $(x,y)$ then l makes it $(x-1,y)$
- if the position of robot is $(x,y)$ then d makes it $(x,y-1)$
- if the position of robot is $(x,y)$ then r makes it $(x+1,y)$
The robot is performing a counter-clockwise spiral movement such that his movement can be represented by the following sequence of moves -
ulddrruuulllddddrrrruuuuu… and so on.
A single move takes 1 sec. You have to find out the position of the robot on the cartesian plane at $t$ second.

-----Input:-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first line of each test case contains a single integer $t$.

-----Output:-----
For each test case, print two space-separated integers, $(x,y)$ — the position of the robot.

-----Constraints-----
- $1 \leq T \leq 10^6$
- $1 \leq t \leq 10^{18}$

-----Sample Input:-----
5
1
2
3
50
12233443

-----Sample Output:-----
0 1
-1 1
-1 0
2 4
-1749 812

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = '\r\n\r\nz = int(input())\r\ni = 0\r\nwhile i < z:\r\n  n = int(input())\r\n  p = int(n**(0.5))\r\n  if p*(p+1) < n:\r\n    p += 1\r\n  # print("P", p)\r\n  x, y = 0, 0\r\n  q = 0\r\n  flag = True\r\n  if p*(p+1) == n:\r\n    # print("Even steps, nice")\r\n    q = p\r\n  else:\r\n    # remaining steps\r\n    q = p-1\r\n    flag = False\r\n  if q%2 :\r\n    # odd\r\n    x -= ((q+1)//2)\r\n    y += ((q+1)//2)\r\n  else :\r\n    x += (q//2)\r\n    y -= (q//2)\r\n  if flag:\r\n    print(x, y)\r\n  else:\r\n    # remaining steps\r\n    l = q*(q+1)\r\n    t = p*(p+1)\r\n    diff = t-l\r\n    \r\n\r\n    # print(x, y)\r\n    if x < 0:\r\n      # left\r\n      if n-l >= diff//2:\r\n        y *= (-1)\r\n        l += (diff//2)\r\n        x += (n-l)\r\n      else :\r\n        y -= (n-l)\r\n      \r\n    else:\r\n      # right\r\n      if n-l >= diff//2:\r\n        y *= (-1)\r\n        y += 1\r\n        l += (diff//2)\r\n        x -= (n-l)\r\n      else :\r\n        y += (n-l)\r\n    # print("Remaining steps: ", n-l)\r\n    print(x, y)\r\n  i+=1 '
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13329