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;
int main() {
  long long int n, i, j;
  cin >> n;
  long long int l = 0, h = (long long int)ceil(sqrt(n));
  long long int mid, ans = 0;
  while (l <= h) {
    mid = (l + h) / 2;
    if (3 * mid * (mid + 1) <= n) {
      ans = mid;
      l = mid + 1;
    } else {
      h = mid - 1;
    }
  }
  long long int x = ans * 2, y = 0;
  if (ans * (ans + 1) * 3 == n) {
    cout << x << " " << y << endl;
    return 0;
  }
  n = n - (ans + 1) * (ans)*3;
  x = x + 1;
  y = y + 2;
  n--;
  if (ans <= n) {
    x = x - ans;
    y = y + 2 * ans;
    n = n - ans;
  } else {
    x = x - n;
    y = y + 2 * n;
    n = 0;
  }
  for (i = 0; i < 5 && n; i++) {
    if (i == 0) {
      if (ans + 1 <= n) {
        x = x - 2 * (ans + 1);
        n -= ans + 1;
      } else {
        x = x - 2 * (n);
        n = 0;
      }
    } else if (i == 1) {
      if (ans + 1 <= n) {
        x = x - (ans + 1);
        y = y - 2 * (ans + 1);
        n -= ans + 1;
      } else {
        x = x - (n);
        y = y - 2 * n;
        n = 0;
      }
    } else if (i == 2) {
      if (ans + 1 <= n) {
        x = x + (ans + 1);
        y = y - 2 * (ans + 1);
        n -= ans + 1;
      } else {
        x = x + (n);
        y = y - 2 * n;
        n = 0;
      }
    } else if (i == 3) {
      if (ans + 1 <= n) {
        x = x + 2 * (ans + 1);
        n -= ans + 1;
      } else {
        x = x + 2 * (n);
        n = 0;
      }
    } else if (i == 4) {
      if (ans + 1 <= n) {
        x = x + (ans + 1);
        y = y + 2 * (ans + 1);
        n -= ans + 1;
      } else {
        x = x + (n);
        y = y + 2 * n;
        n = 0;
      }
    }
  }
  cout << x << " " << y << endl;
  return 0;
}