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:
from functools import reduce
from decimal import *
import math
import itertools

class pair(list):
    def __init__(self, a, b):
        list.__init__(self, (a, b))
    def __add__(self, q): return pair(self[0]+q[0], self[1]+q[1])
    def __sub__(self, q): return pair(self[0]-q[0], self[1]-q[1])
    def __mul__(self, k): return pair(k*self[0], k*self[1])
    def __neg__(self): return pair(-self[0], -self[1])

setcontext(ExtendedContext)
getcontext().prec = 100
a, b, c = pair(1,2), pair(-2,0), pair(-1,2)
n = int(input())
k = int(((Decimal(3 + 4*n) / Decimal(3)).sqrt() - Decimal(1)) // 2)
n1 = n - 3*k*(k+1)
x, y = n1//(k+1), n1%(k+1)
L = [c, b, -a, -c, -b, a]
M = [pair(0,0)] + list(itertools.accumulate(L))
if n1 == 0:
    ans = pair(2,0)*k
else:
    ans = pair(2,0)*(k+1) + M[x]*(k+1) + L[x]*y
print(ans[0], ans[1])