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>
int main() {
  long long n, m, i, r, x, y, j, t;
  scanf("%I64d", &n);
  m = n / 3;
  double sq1 = sqrt(m);
  long long sq = (long long)sq1;
  x = sq + 1;
  x *= 3;
  x *= sq;
  if (x > n) sq--;
  i = sq + 1;
  i *= 3;
  i *= sq;
  if (i == n) {
    x = 2 * sq;
    y = 0;
  } else {
    t = sq + 1;
    if (n < i + t) {
      y = 2;
      x = 1 + 2 * sq;
      j = n - i - 1;
      x -= j;
      y += 2 * j;
    } else if (n < i + 2 * t) {
      y = 2 * t;
      x = t;
      j = n - i - t;
      x -= 2 * j;
    } else if (n < i + 3 * t) {
      y = 2 * t;
      x = -t;
      j = n - i - 2 * t;
      x -= j;
      y -= 2 * j;
    } else if (n < i + 4 * t) {
      y = 0;
      x = -2 * t;
      j = n - i - 3 * t;
      x += j;
      y -= 2 * j;
    } else if (n < i + 5 * t) {
      y = -2 * t;
      x = -t;
      j = n - i - 4 * t;
      x += 2 * j;
    } else {
      y = -2 * t;
      x = t;
      j = n - i - 5 * t;
      x += j;
      y += 2 * j;
    }
  }
  printf("%I64d %I64d", x, y);
  return 0;
}