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, m;
long long x, y;
long long read() {
  long long k = 0, f = 1;
  char c = getchar();
  while (c > '9' || c < '0') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    k = k * 10 + (c - '0');
    c = getchar();
  }
  return k * f;
}
int main() {
  long long i, j, k;
  n = read();
  k = 6;
  j = 6;
  i = 1;
  long long head = 0, tail = 1000000000;
  while (tail - head > 1) {
    long long mid = (head + tail) >> 1;
    if ((mid + 1) * mid * 3 <= n)
      head = mid;
    else
      tail = mid;
  }
  x += head * 2;
  i = head + 1;
  n -= head * (head + 1) * 3;
  if (n == 0) {
    cout << x << " " << y;
    return 0;
  }
  if (n < i) {
    y += n * 2;
    x -= n - 1;
    x++;
    cout << x << " " << y;
    return 0;
  }
  if (n >= i) {
    y += 2 * (i - 1);
    x -= i - 1;
    x++;
    y += 2;
    if (n == i) {
      cout << x << " " << y;
      return 0;
    }
    n -= i;
    x -= min(n, i) * 2;
    n -= min(n, i);
    if (!n) {
      cout << x << " " << y;
      return 0;
    }
    x -= min(n, i);
    y -= min(n, i) * 2;
    n -= min(n, i);
    if (!n) {
      cout << x << " " << y;
      return 0;
    }
    x += min(n, i);
    y -= min(n, i) * 2;
    n -= min(n, i);
    if (!n) {
      cout << x << " " << y;
      return 0;
    }
    x += min(n, i) * 2;
    n -= min(n, i);
    if (!n) {
      cout << x << " " << y;
      return 0;
    }
    x += min(n, i);
    y += min(n, i) * 2;
    n -= min(n, i);
    if (!n) {
      cout << x << " " << y;
      return 0;
    }
  }
  return 0;
}