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;
const int N = 2110;
long long n;
long long f(long long k) {
  long long res = 1 + 3ll * k * (k + 1);
  return res;
}
long long get(long long n) {
  long long l = 1, r = sqrt(1.0 * n) + 10;
  while (l + 1 < r) {
    long long m = (l + r) / 2;
    if (f(m - 1) > n)
      r = m - 1;
    else
      l = m;
  }
  if (f(r - 1) <= n) return r;
  return l;
}
int main() {
  cin >> n;
  if (n == 0) {
    cout << 0 << " " << 0;
    return 0;
  }
  long long k = get(n);
  long long xans, yans;
  n -= f(k - 1);
  if (n < k) {
    xans = 2 * k - 1 - n;
    yans = 2 + 2 * n;
  } else if (n < 2 * k) {
    n -= k - 1;
    xans = k - 2 * n;
    yans = 2 * k;
  } else if (n < 3 * k) {
    n -= k - 1 + k;
    xans = -k - n;
    yans = 2 * k - 2 * n;
  } else if (n < 4 * k) {
    n -= k - 1 + 2 * k;
    xans = -2 * k + n;
    yans = -2 * n;
  } else if (n < 5 * k) {
    n -= k - 1 + 3 * k;
    xans = -k + 2 * n;
    yans = -2 * k;
  } else {
    n -= k - 1 + 4 * k;
    xans = k + n;
    yans = -2 * k + 2 * n;
  }
  cout << xans << " " << yans;
  return 0;
}