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:
def main():
	n = int(input())
	(x, y) = solver(n)
	print(x, y)

def solver(n):
	rounds = int(quadraticEqPlus(3, 3, -n))
	n -= 3 * rounds * (rounds + 1)
	curPoint = (2 * rounds, 0)
	curRound = rounds + 1
	# go UpRight
	#if n >= 1:
	#	curPoint = goUpRight()
	circle = [(goUpRight, 1), (goUpLeft, curRound - 1), 
	(goLeft, curRound), (goDownLeft, curRound), 
	(goDownRight, curRound), (goRight, curRound), 
	(goUpRight, curRound)]
	for (func, steps) in circle:
		if n >= steps:
			curPoint = func(curPoint, steps)
			n -= steps
		else:
			curPoint = func(curPoint, n)
			n = 0
			return curPoint
	assert(False)

def quadraticEqPlus(a, b, c):
	return (-b + (b**2 - 4 * a * c)**0.5) / (2 * a)

#print(quadraticEqPlus(3, 3, 0))
def goUpLeft(point, steps):	
	return (point[0] - steps, point[1] + 2 * steps)

def goLeft(point, steps):	
	return (point[0] - 2 * steps, point[1])

def goDownLeft(point, steps):	
	return (point[0] - steps, point[1] - 2 * steps)

def goDownRight(point, steps):	
	return (point[0] + steps, point[1] - 2 * steps)

def goRight(point, steps):	
	return (point[0] + 2 * steps, point[1])

def goUpRight(point, steps):	
	return (point[0] + steps, point[1] + 2 * steps)

main()
#for n in range(21):
#	print(solver(n))

#print(solver(7))