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 getR(long long x) {
  long long l = 0;
  long long r = 666666666;
  long long mid;
  long long res = 0;
  while (l <= r) {
    mid = (l + r) >> 1;
    long long sum = (6 + 6 * mid) * mid / 2;
    if (sum >= x) {
      r = mid - 1;
    } else {
      l = mid + 1;
      res = max(res, mid);
    }
  }
  return res;
}
int main() {
  long long n;
  cin >> n;
  if (n == 0) {
    cout << "0 0" << endl;
    return 0;
  }
  long long r = getR(n);
  n -= (6 + 6 * r) * r / 2;
  r++;
  int dir = 0;
  while (n > r) {
    n -= r;
    dir++;
  }
  n--;
  long long x, y;
  switch (dir) {
    case 0:
      x = r * 2 - 1;
      y = 2;
      y += n * 2;
      x -= n;
      break;
    case 1:
      x = r - 2;
      y = r * 2;
      x -= n * 2;
      break;
    case 2:
      x = -r - 1;
      y = r * 2 - 2;
      x -= n;
      y -= n * 2;
      break;
    case 3:
      x = -r * 2 + 1;
      y = -2;
      y -= n * 2;
      x += n;
      break;
    case 4:
      x = -r + 2;
      y = -r * 2;
      x += n * 2;
      break;
    case 5:
      x = r + 1;
      y = -r * 2 + 2;
      x += n;
      y += n * 2;
      break;
  }
  cout << x << " " << y << endl;
  return 0;
}