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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
long long getS(long long n) {
  if (n == 1) return 0;
  n -= 1;
  long long r = 1, sz = 6;
  while (n > r * sz) {
    n -= r * sz;
    r++;
  }
  return r;
}
void solve(long long n) {
  if (n == 1) return;
  n -= 1;
  long long r = 1, sz = 6;
  while (n > sz) {
    n -= sz;
    sz += 6;
  }
  r = sz / 6;
  long long x = 1 + 2 * (r - 1), y = 2;
  long long side = r + 1;
  if (n > side - 1) {
    x -= 1 * (side - 2);
    y += 2 * (side - 2);
    n -= side - 1;
  } else {
    x -= 1 * (n - 1);
    y += 2 * (n - 1);
    n -= side - 1;
    cout << x << " " << y << endl;
    return;
  }
  if (n > side - 1) {
    x -= 2 * (side - 1);
    y += 0 * (side - 1);
    n -= side - 1;
  } else {
    x -= 2 * (n);
    y += 0 * (n);
    n -= side - 1;
    cout << x << " " << y << endl;
    return;
  }
  if (n > side - 1) {
    x -= 1 * (side - 1);
    y -= 2 * (side - 1);
    n -= side - 1;
  } else {
    x -= 1 * (n);
    y -= 2 * (n);
    n -= side - 1;
    cout << x << " " << y << endl;
    return;
  }
  if (n > side - 1) {
    x += 1 * (side - 1);
    y -= 2 * (side - 1);
    n -= side - 1;
  } else {
    x += 1 * (n);
    y -= 2 * (n);
    n -= side - 1;
    cout << x << " " << y << endl;
    return;
  }
  if (n > side - 1) {
    x += 2 * (side - 1);
    y -= 0 * (side - 1);
    n -= side - 1;
  } else {
    x += 2 * (n);
    y -= 0 * (n);
    n -= side - 1;
    cout << x << " " << y << endl;
    return;
  }
  if (n > side - 1) {
    x += 1 * (side - 1);
    y += 2 * (side - 1);
    n -= side - 1;
  } else {
    x += 1 * (n);
    y += 2 * (n);
    n -= side - 1;
    cout << x << " " << y << endl;
    return;
  }
}
void solveAll(long long n) {
  long long s = getS(n);
  if (s == 0) {
    cout << "0 0" << endl;
  } else {
    solve(n);
  }
}
int main() {
  long long n;
  cin >> n;
  n++;
  solveAll(n);
}