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.Scanner;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		if (n == 0) {
			System.out.println(0 + " " + 0);
			return;
		}
		long l = 1, r = (long) 1e9, ans = 0;
		while (l <= r) {
			long mid = (l + r) / 2;
			if (mid * (mid + 1) * 3 >= n) {
				ans = mid;
				r = mid - 1;
			} else {
				l = mid + 1;
			}
		}
		n -= (long)ans * (ans - 1) * 3 + 1;
		long dx = ans * 2 - 1, dy = 2;
		long t = Math.min(n, ans - 1);
		n -= t;
		dx -= t;
		dy += 2 * t;
		t = Math.min(n, ans);
		n -= t;
		dx -= 2 * t;
		t = Math.min(n, ans);
		n -= t;
		dx -= t;
		dy -= 2 * t;
		t = Math.min(n, ans);
		n -= t;
		dx += t;
		dy -= 2 * t;
		t = Math.min(n, ans);
		n -= t;
		dx += 2 * t;
		t = Math.min(n, ans);
		n -= t;
		dx += t;
		dy += 2 * t;
		System.out.println(dx + " " + dy);
		sc.close();
	}
}