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

public class E {

    public static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    public static StringTokenizer tok;

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

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

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

    public static String nextToken() throws IOException {
        if (tok == null || !tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    public static class Pair {
        public long x, y;
        public Pair(long x, long y) {
            this.x = x;
            this.y = y;
        }
    }

    public static long func(long number) {
        return number * (3 * number + 2);
    }

    public static Pair result(long v, long n) {
        long vLeft = n - func(v);
        long x = v, y = -2 * v;
        v++;
        if (vLeft <= v) {
            x += vLeft;
            y += vLeft * 2;
            return new Pair(x, y);
        }
        x += v;
        y += v * 2;
        vLeft -= v;
        if (vLeft <= v - 1) {
            x -= vLeft;
            y += vLeft * 2;
            return new Pair(x, y);
        }
        x -= v - 1;
        y += (v - 1) * 2;
        vLeft -= v - 1;
        if (vLeft <= v) {
            x -= vLeft * 2;
            return new Pair(x, y);
        }
        x -= v * 2;
        vLeft -= v;
        if (vLeft <= v) {
            x -= vLeft;
            y -= vLeft * 2;
            return new Pair(x, y);
        }
        x -= v;
        y -= v * 2;
        vLeft -= v;
        if (vLeft <= v) {
            x += vLeft;
            y -= vLeft * 2;
            return new Pair(x, y);
        }
        x += v;
        y -= v * 2;
        vLeft -= v;
        x += vLeft * 2;
        return new Pair(x, y);
    }

    public static void main(String[] args) throws IOException {
        long n = nextLong();
        long low = 0, high = 1_000_000_000;
        while (low < high) {
            long center = (high + low) / 2;
            if (func(center) <= n && n < func(center + 1)) {
                low = high = center;
            } else if (func(center) > n) {
                high = center - 1;
            } else {
                low = center + 1;
            }
        }

        Pair answer = result(low, n);
        System.out.println(answer.x + " " + answer.y);
    }
}