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 PYTHON):

Solution:
points = [(2,0),(1,-2),(-1,-2),(-2,0),(-1,2),(1,2)]

## find n such that , it lies on hexangon of length n+1

l = int(raw_input())

lo = 1
hi = 10**18

while lo < hi :
    mid = lo + hi
    mid /= 2
    if 3 * mid *(mid+1) < l :
        lo = mid + 1

    else :
        hi = mid

if 3 * lo *(lo+1) == l :
    print 2*lo,0

elif l!=0:
    ring = lo
    dist = 3 * ring *(ring +1 ) - l
    seg = dist / ring
    parity = dist % (ring)
    xslope = points[(seg+1)%6][0] - points[seg][0]
    yslope = points[(seg+1)%6][1] - points[seg][1]
    x = ring*points[seg][0] + xslope * parity
    y = ring*points[seg][1] + yslope * parity
    print x,y
else :
    print 0 , 0