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 n;
long long dx[] = {-1, -2, -1, 1, 2, 1};
long long dy[] = {-2, 0, 2, 2, 0, -2};
long long getmin(long long x, long long y) { return x < y ? x : y; }
void conduct() {
  if (!n) {
    printf("0 0\n");
    return;
  }
  long long lst = 0L, mst = 1000000000L;
  while (lst < mst) {
    long long mid = (lst + mst + 1) >> 1L;
    long long val = 3 * mid * mid + 3 * mid;
    if (val >= n)
      mst = mid - 1;
    else
      lst = mid;
  }
  n -= 3 * lst * lst + 3 * lst + 1;
  ++lst;
  n = 6 * lst - 1 - n;
  long long x = 2 * lst, y = 0;
  for (int i = 0; i < 6; ++i) {
    long long dlt = getmin(n, lst);
    x += dlt * dx[i];
    y += dlt * dy[i];
    n -= dlt;
  }
  cout << x << " " << y << endl;
}
int main() {
  while (cin >> n) conduct();
  return 0;
}