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:
import math

def printa(x,y):
	print(2*x+y," ",2*y);

n=int(input())
a=math.floor((-3+math.sqrt(9+12*n))/6)

while (3*a*(a+1) > n): 
	a -= 1
	
while (3*(a+1)*(a+2) <= n):
	a += 1
	
b=n-3*a*(a+1)

if (b == 0 or b == 1):
	printa(a,b)
	quit()
b -= 1
if (b >= 0 and b <= a):
	printa(a-b,b+1)
	quit()
b -= a
if (b >= 0 and b <= (a+1)):
	printa(-b,a+1)
	quit()
b -= (a+1)
if (b >= 0 and b <= (a+1)):
	printa(-a-1,a+1-b)
	quit()
b -= (a+1)
if (b >= 0 and b <= (a+1)):
	printa(-a-1+b,-b)
	quit()
b -= (a+1)
if (b >= 0 and b <= (a+1)):
	printa(b,-a-1)
	quit()
b -= (a+1)
printa(a+1,-a-1+b)