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.*;
public class CF615E {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long n = in.nextLong();
		
		long hi = 2_000_000_000l;
		long lo = 0l;
		
		while(hi - lo > 1)
		{
			long mid = (hi + lo)/2;
			long ans = (mid*(mid+1))*3;
			if(ans > n)
				hi = mid;
			
			else
				lo = mid;
		}
		
		long multIndex = (lo*(lo+1))/2;
		long multAdd = lo + 1;
//		while(true)
//		{
//			if(6*(multIndex + multAdd) > n)
//				break;
////			System.out.println(6*multIndex);
//			multIndex += multAdd;
//			multAdd++;
//		}
		long atx = 2*(multAdd - 1);
		long aty = 0;
//		System.out.println("Ring: " + (multAdd - 1));
//		System.out.println("Ring start coordinates: (" + atx + ", 0)");
		long remaining = n - (6*multIndex);
//		System.out.println("Remaining Moves: " + remaining);
		long movesPerSide = (multAdd);
//		System.out.println("Moves Per Side: " + movesPerSide);
		
		int[] dy = {2,0,-2,-2,0,2};
		int[] dx = {-1,-2,-1,1,2,1};
		int side = 0;
		if(remaining > 0)
		{
			atx ++;
			aty += 2;
			remaining --;
		}
		
		while(remaining > 0)
		{
			long take = Math.min(remaining, movesPerSide - (side == 0 ? 1 : 0));
			atx += dx[side]*take;
			aty += dy[side]*take;
			
			remaining -= movesPerSide;
			if(side == 0)
				remaining ++;
			side++;
		}
		
		System.out.println(atx + " " + aty);
	}
}