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:
def search(n,low,high):
    mid = (low + high) / 2

    while low < high:
        mid = (low + high) / 2
        x = 3 * mid * (mid+1)
        #print low,high,x
        if x > n:
            high = mid
        elif x == n:
            return mid
        elif low + 1 >= high:
            if 3 * low * (low+1) >= n:
                return low
            return high
        else:
            low = mid + 1
    return low

n = input()

if n == 0:
    print 0,0
else:
    # 0,6,12,18...
    # 123456
    # sum(6n) = 3n(n+1)
    x = search(n,1,int(1e10))

    index = 3*x*(x+1) - n
    #print x,index
    
    if index == 0:
        print x * 2  , 0

    else:
        t = (index-1) % x
        q = (index-1) / x

        if q == 0:
            print x * 2 - 1 - t , -(t+1) * 2
            
        basis = x * 2 - 1 - (x-1) , -x * 2
        
        if q == 1:
            print basis[0] - 2 - t * 2,basis[1]

        basis = basis[0] - 2 - (x-1) * 2,basis[1]
        
        if q == 2:
            print basis[0] - (t+1) , basis[1] + (t+1) * 2
            
        basis = basis[0] - x ,basis[1] + x * 2
        
        if q == 3:
            print basis[0] + (t+1) , basis[1] + (t+1) * 2

        basis = basis[0] + x ,basis[1] + x * 2
        
        if q == 4:
            print basis[0] + (t+1) * 2 , basis[1] 

        basis = basis[0] + x * 2 ,basis[1]
        
        if q == 5:
            print basis[0] + (t+1) , basis[1] - (t+1) * 2