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 E615 {
	static long[] dx = new long[]{1, -1, -2, -1, 1, 2, 1};
  static long[] dy = new long[]{2, 2, 0, -2, -2, 0,2};
	public static void main(String[] args) throws IOException
	{
	    input.init(System.in);
	    PrintWriter out = new PrintWriter(System.out);
	    long n = input.nextLong();
	    int lo = 0, hi = (int)1e9;
	    while(lo < hi - 1)
	    {
	        int mid = (lo+hi)/2;
	        long moves = 6 * (long)mid * (mid+1)/2;
	        if(moves <= n) lo = mid;
	        else hi = mid;
	    }
	    long cycles = lo;
	    n -= cycles * (long)6 * (cycles+1)/2;
	    long x = 2*cycles;
	    long y = 0;
	    long[] ds = new long[]{1, cycles, cycles+1, cycles+1, cycles+1, cycles+1, cycles+1};
	    if(cycles == 0) ds = new long[]{1, 0, 1, 1, 1, 1, 1};
	    else if(cycles == 1) ds = new long[]{1, 1, 2, 2, 2, 2, 2};
	    for(int i = 0; i<7; i++)
	    {
	        long moves = Math.min(n, ds[i]);
	        x += dx[i] * moves;
	        y += dy[i] * moves;
	        n -= moves;
	    }
	    out.println(x+" "+y);
	    out.close();
	}
public static class input {
	static BufferedReader reader;
	static StringTokenizer tokenizer;

	static void init(InputStream input) {
		reader = new BufferedReader(new InputStreamReader(input));
		tokenizer = new StringTokenizer("");
	}

	static String next() throws IOException {
		while (!tokenizer.hasMoreTokens())
			tokenizer = new StringTokenizer(reader.readLine());
		return tokenizer.nextToken();
	}

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

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

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