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 JAVA):

Solution:
import java.util.*;
import java.io.*;
public class Main {
public static void main(String [] args)throws Exception{
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	long n = Long.parseLong(br.readLine());
	
	long high = (long)1E9 + 10;
	long low = 0;
	while(low < high){
		long mid = (low + high)/2;
		if(3*mid*(mid + 1) < n)
			low = mid + 1;
		else high = mid;	
	}
	long steps = 3*high*(high + 1) - n;
	long x = 2*high;
	long y = 0;
	//System.out.println(high + " " + x + " " + steps);
	if(steps > 0){
		x -= Math.min(high,steps);
		y -= 2*Math.min(high,steps);
		steps -= Math.min(steps,high);
	}
	//System.out.println(steps + " " + x + " " + y);
	if(steps > 0){
		x -= 2*Math.min(high,steps);
		steps -= Math.min(steps,high);
	}
	//System.out.println(steps + " " + x + " " + y);
	if(steps > 0){
		x -= Math.min(steps,high);
		y += 2*Math.min(steps,high);
		steps -= Math.min(high,steps);
	}
	//System.out.println(steps + " " + x + " " + y);
	if(steps > 0){
		x += Math.min(steps,high);
		y += 2*Math.min(steps,high);
		steps -= Math.min(high,steps);
	}
	//System.out.println(steps + " " + x + " " + y);
	if(steps > 0){
		x += 2*Math.min(steps,high);
        steps -= Math.min(steps,high);
	}
	//System.out.println(steps + " " + x + " " + y);
	if(steps > 0){
		x += Math.min(steps,high);
		y -= 2*Math.min(steps,high);
	}
	System.out.print(x + " " + y);
}
}