Problem: Ayrat is looking for the perfect code. He decided to start his search from an infinite field tiled by hexagons. For convenience the coordinate system is introduced, take a look at the picture to see how the coordinates of hexagon are defined: 

<image> <image> Ayrat is searching through the field. He started at point (0, 0) and is moving along the spiral (see second picture). Sometimes he forgets where he is now. Help Ayrat determine his location after n moves.

Input

The only line of the input contains integer n (0 ≤ n ≤ 1018) — the number of Ayrat's moves.

Output

Print two integers x and y — current coordinates of Ayrat coordinates.

Examples

Input

3


Output

-2 0


Input

7


Output

3 2

Solution (in PYTHON3):

Solution:
ru = (1,2)
r = (2,0)
rd = (1,-2)
ld = (-1,-2)
l = (-2,0)
lu = (-1,2)
x, y = 0, 0
n = int(input())
l = -1
r = int(1e18)
while r - l > 1:
    m = (r + l)//2
    if 5 * m + 3 * m * (m - 1) > n: r = m
    else: l = m
    
x += l * (1)
y += l * (-2)
n -= 5 * l + 3 * l * (l - 1)
if n<r:
    x+= n * 1
    y+= n * (2)
    n = 0
else:
    n -= r
    x+=r*1
    y+=r*2
    
if n<r-1:
    x+= n * (-1)
    y+= n * 2
    n = 0
else:
    n -= l
    x+=l*(-1)
    y+=l*2
if n < r:
    x+=-2 * n
    n = 0
else:
    n-=r
    x+=-2 * r
if n < r:
    x+=-1 * n
    y+=-2 * n
    n = 0
else:
    n -= r
    x+=-1 * r
    y+=-2 * r
    
if n < r:
    x+=1 * n
    y+=-2 * n
    n = 0
else:
    n -= r
    x += 1*r
    y += -2*r
    
if n < r:
    x+=2*n
    
print(x, y)