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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Codeforces615E {

	public static void main(String[] args) {
		try
		{
			BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
			long n = Long.parseLong(f.readLine());
			if(n == 0)
				System.out.println(0 + " " + 0);
			else if(n == 1)
				System.out.println(1 + " " + 2);
			else if(n == 2)
				System.out.println(-1 + " " + 2);
			else if(n == 3)
				System.out.println(-2 + " " + 0);
			else if(n == 4)
				System.out.println(-1 + " " + -2);
			else if(n == 5)
				System.out.println(1 + " " + -2);
			else if(n == 6)
				System.out.println(2 + " " + 0);
			else
			{
				f.close();
				long r = (long) Math.sqrt(n/3);
				while(3*r*(r + 1) < n)
					r++;
				//System.out.println(r);
				n -= 3*(r - 1)*(r);
				if(n == 6*r)
					System.out.println(2*r + " " + 0);
				else
				{
					//System.out.println(n);
					long x = 0;
					long y = 0;
					if(n/r == 0)
					{
						x = 2*r;
						y = 0;
						x -= n%r;
						y += 2*(n%r);
					}
					else if(n/r == 1)
					{
						x = r;
						y = 2*r;
						x -= 2*(n%r);
					}
					else if(n/r == 2)
					{
						x = -r;
						y = 2*r;
						x -= (n%r);
						y -= 2*(n%r);
					}
					else if(n/r == 3)
					{
						x = -2*r;
						y = 0;
						x += (n%r);
						y -= 2*(n%r);
					}
					else if(n/r == 4)
					{
						x = -r;
						y = -2*r;
						x += 2*(n%r);
					}
					else
					{
						x = r;
						y = -2*r;
						x += (n%r);
						y += 2*(n%r);
					}
					System.out.println(x + " " + y);
				}
			}
		}
		catch(IOException e)
		{
			e.printStackTrace();
		}

	}

}