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:
S = int(raw_input());
if S == 0:
    print "0 0";
else:
    s = 0;
    e = 10**9;
    while s < e:
        m = s + (e - s + 1)/2;
        if 3*m*(m + 1) < S: s = m;
        else: e = m - 1;
    x = 2*s + 1;
    y = 2;
    S -= 3*s*(s + 1) + 1;
    #print S;
    #print x,y;
    step = s + 1;
    dx = [-1,-2,-1, 1,2,1];
    dy = [ 2, 0,-2,-2,0,2];
    i = 0;
    while S and i < len(dx):
        m = min(step - (i == 0),S);
        #print "move ",m*dx[i],m*dy[i]
        S -= m;
        x += m*dx[i];
        y += m*dy[i];
        i += 1;
        #print "to",x,y;
    assert S == 0;
    print "%d %d"%(x,y);