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

/**
 * @auther chao
 * @date 15/12/30
 */
public class MainApp {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long n = in.nextLong();
        long k = 0;
        if (n > 0) {
            long st = 0;
            long ed = 1000000000l;
            while (ed - st > 1) {
                long mid = (st + ed ) >> 1;
                if (3*mid*(mid+1) >= n) ed = mid;
                else    st = mid;
            }
            k = ed;
        }

        long[] ax = new long[]{-1, -2, -1,  1, 2, 1};
        long[] ay = new long[]{ 2,  0, -2, -2, 0, 2};
        long remain = n - 3*(k-1)*k;
        long x, y;
        x = 2*k;
        y = 0;
        int d = 0;
        while (remain > 0) {
            long m = Math.min(remain, k);
            remain -= m;
            x += ax[d] * m;
            y += ay[d] * m;
            d++;
        }
        System.out.println(x + " " + y);
    }
}