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;
string st;
long long t, n, x[49];
bool ok;
int main() {
  long long dr2 = 0, dr1 = 1, x = 0, y = 0;
  ios_base::sync_with_stdio(NULL);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  long long k = n / 3;
  k = sqrt(k);
  while ((k * (k + 1)) > (n / 3)) k--;
  while (((k + 1) * (k + 2)) < (n / 3)) k++;
  dr1 = k + 1;
  dr2 = k;
  x = k * 2;
  n -= k * (k + 1) * 3;
  if (n > 0) {
    n--;
    x++;
    y += 2;
  }
  if (n >= dr2) {
    n -= dr2;
    x -= dr2;
    y += 2 * dr2;
  } else {
    x -= n;
    y += 2 * n;
    ok = 1;
  }
  if (n >= dr1 && ok == 0) {
    n -= dr1;
    x -= 2 * dr1;
  } else if (ok == 0) {
    x -= 2 * n;
    ok = 1;
  }
  if (n >= dr1 && ok == 0) {
    n -= dr1;
    x -= dr1;
    y -= 2 * dr1;
  } else if (ok == 0) {
    x -= n;
    y -= 2 * n;
    ok = 1;
  }
  if (n >= dr1 && ok == 0) {
    n -= dr1;
    x += dr1;
    y -= 2 * dr1;
  } else if (ok == 0) {
    x += n;
    y -= 2 * n;
    ok = 1;
  }
  if (n >= dr1 && ok == 0) {
    n -= dr1;
    x += 2 * dr1;
  } else if (ok == 0) {
    x += 2 * n;
    ok = 1;
  }
  if (ok == 0) {
    x += n;
    y += 2 * n;
    ok = 1;
  }
  cout << x << " " << y;
}