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:
// practice with rainboy
import java.io.*;
import java.util.*;

public class CF615E extends PrintWriter {
	CF615E() { super(System.out, true); }
	Scanner sc = new Scanner(System.in);
	public static void main(String[] $) {
		CF615E o = new CF615E(); o.main(); o.flush();
	}

	void main() {
		long n = sc.nextLong();
		// 6 * k * (k + 1) / 2 = 3 * k * (k + 1);
		long k = (long) Math.sqrt(n / 3);
		while (3 * (k + 1) * (k + 2) <= n)
			k++;
		while (3 * k * (k + 1) > n)
			k--;
		long x = k * 2, y = 0;
		n -= 3 * k * (k + 1);
		k++;
		long m = Math.min(n, 1);
		n -= m; x += m; y += m * 2;
		m = Math.min(n, k - 1);
		n -= m; x -= m; y += m * 2;
		m = Math.min(n, k);
		n -= m; x -= m * 2;
		m = Math.min(n, k);
		n -= m; x -= m; y -= m * 2;
		m = Math.min(n, k);
		n -= m; x += m; y -= m * 2;
		m = Math.min(n, k);
		n -= m; x += m * 2;
		m = Math.min(n, k);
		n -= m; x += m; y += m * 2;
		println(x + " " + y);
	}
}