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>
long long find(long long n) {
  long long l = 1, r = 1000000000;
  long long out = 0;
  while (r >= l) {
    long long mid = (l + r) / 2;
    if (3 * mid * (mid + 1) <= n) {
      out = mid;
      l = mid + 1;
    } else
      r = mid - 1;
  }
  return out;
}
int main() {
  long long n;
  scanf("%I64d", &n);
  long long quan = find(n);
  quan++;
  long long l = n - 3 * (quan) * (quan - 1);
  long long chu = l / quan, yu = l % quan;
  if (l) {
    long long x, y;
    if (chu == 0) {
      x = 2 * quan - yu;
      y = 2 * yu;
    } else if (chu == 1) {
      x = quan - yu * 2;
      y = 2 * quan;
    } else if (chu == 2) {
      x = -quan - yu;
      y = 2 * quan - 2 * yu;
    } else if (chu == 3) {
      x = -2 * quan + yu;
      y = -2 * yu;
    } else if (chu == 4) {
      x = -quan + 2 * yu;
      y = -2 * quan;
    } else if (chu == 5) {
      x = quan + yu, y = -2 * quan + 2 * yu;
    } else {
      x = 2 * quan, y = 0;
    }
    printf("%I64d %I64d", x, y);
  } else {
    printf("%I64d 0", 2 * (quan - 1));
  }
}