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();
        // 3*k(k+1) <= n < 3*k*(k+1);
        long k = getK(n);
        long x, y;
        long m = n - 3*(k-1)*k;
        if (m < k+1) {
            x = 2*k - m;
            y = 2*m;
        } else if (m < 2*k) {
            x = k - 2 * (m-k);
            y = 2*k;
        } else if (m < 3*k) {
            x = -k - (m-2*k);
            y = 2*k - 2 * (m-2*k);
        } else if (m < 4*k) {
            x = -2*k + (m - 3*k);
            y = -2 *(m - 3*k);
        } else if (m < 5*k) {
            x = -k + 2 *(m - 4*k);
            y = -2*k;
        } else {
            x = k + (m - 5*k);
            y = -2 *k + 2*(m - 5*k);
        }
        System.out.println(x + " " + y);
    }
    private static long getK(long x) {
        long k = (long)Math.sqrt(x/3);
        if (3*k*(k+1) >= x) {
            return k;
        } else {
            return k+1;
        }
    }
}