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

public class E {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

	void solve() throws IOException {
        long n = readLong();
        if(n == 0) {
            out.println("0 0");
            return;
        }
        long circle = -1;
        long l = 1;
        long r = 1000 * 1000 * 1000;
        while(l <= r) {
            long m = (l+r) / 2;
            long last = 6 * m;
            long sum = (last + 6) * m / 2;
            if(sum >= n) {
                circle = m;
                r = m - 1;
            } else {
                l = m + 1;
            }
        }
        long sum = (6*(circle-1) + 6) * (circle-1) / 2;
        long numInCircle = n - sum - 1;
        long line = numInCircle / circle;
        long numInLine = numInCircle % circle + 1;
        int[] lx = {-1, -2, -1, 1, 2, 1};
        int[] ly = {2, 0, -2, -2, 0, 2};
        long lineSize = circle;

        long curX = circle * 2;
        long curY = 0;
        for(int i = 0; i < line; i++) {
            curX = curX + lx[i] * lineSize;
            curY = curY + ly[i] * lineSize;
        }
        curX = curX + lx[(int)line] * numInLine;
        curY = curY + ly[(int)line] * numInLine;

        out.println(curX + " " + curY);
	}


    void init() throws FileNotFoundException {
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    int[] readArr(int n) throws IOException {
        int[] res = new int[n];
        for (int i = 0; i < n; i++) {
            res[i] = readInt();
        }
        return res;
    }

    long[] readArrL(int n) throws IOException {
        long[] res = new long[n];
        for (int i = 0; i < n; i++) {
            res[i] = readLong();
        }
        return res;
    }

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

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            init();
            solve();
            out.close();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = " + (t2 - t1));
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }
}