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.*;
import java.util.*;

public class E {
	FastScanner in;
	PrintWriter out;

	int[] cx = new int[] { 2, 1, -1, -2, -1, 1 };
	int[] cy = new int[] { 0, 2, 2, 0, -2, -2 };

	int[] dirx = new int[] { -1, -2, -1, 1, 2, 1 };
	int[] diry = new int[] { 2, 0, -2, -2, 0, 2 };

	long calc(long i) {
		return 3 * (i + 1) * i;
	}
	
	void solve() {
		long n = in.nextLong();
		if (n == 0) {
			out.println("0 0");
			return;
		}
		long l = 0, r = 1000 * 1000 * 1000;
		while (r - l > 1) {
			long m = (l + r) / 2;
			if (calc(m) < n) {
				l = m;
			} else {
				r = m;
			}
		}
		long i = l + 1;
		long cnt = calc(l);
	//	System.err.println("circle " + i);
		for (int j = 0; j < 6; j++) {
			if (cnt + i >= n) {
				long stx = cx[j] * i, sty = cy[j] * i;
				// System.out.println(stx + " " + sty);
				long num = n - cnt;
				long rx = stx + num * dirx[j], ry = sty + num * diry[j];
				out.println(rx + " " + ry);
				// System.out.println(num);
				return;
			}
			cnt += i;
		}
		return;
	}

	void run() {
		in = new FastScanner();
		out = new PrintWriter(System.out);

		solve();

		out.close();
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(in.br.readLine());
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}
	}

	public static void main(String[] args) {
		new E().run();
	}
}