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;
static long long val(long long k) { return k * ((3 * k) + 2); }
static long long value(long long n) {
  long long high = 577350269;
  long long low = 0;
  while (high - low > 1) {
    if (val((high + low) / 2) < n)
      low = (high + low) / 2;
    else
      high = (high + low) / 2;
  }
  return low;
}
int main() {
  long long n;
  cin >> n;
  long long k = value(n);
  long long x = k;
  long long y = -2 * k;
  n -= k * (3 * k + 2);
  x += min(n, k + 1);
  y += 2 * min(n, k + 1);
  n -= min(n, k + 1);
  x -= min(n, k);
  y += 2 * min(n, k);
  n -= min(n, k);
  x -= 2 * min(n, k + 1);
  n -= min(n, k + 1);
  x -= min(n, k + 1);
  y -= 2 * min(n, k + 1);
  n -= min(n, k + 1);
  x += min(n, k + 1);
  y -= 2 * min(n, k + 1);
  n -= min(n, k + 1);
  x += 2 * min(n, k + 1);
  n -= min(n, k + 1);
  cout << x << " " << y << endl;
  return 0;
}