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 int mv1[2] = {1, 2};
long long int mv2[6][2] = {-2, 0, -1, -2, 1, -2, 2, 0, 1, 2, -1, 2};
int main() {
  long long int n;
  scanf("%lld", &n);
  long long int l = 0, r = 580000000;
  while ((r - l) > 1) {
    long long int mid = (l + r) >> 1;
    if (mid * (3 * mid - 2) <= n) {
      l = mid;
    } else {
      r = mid;
    }
  }
  long long int sx = mv1[0] * l;
  long long int sy = mv1[1] * l;
  long long int lst = n - l * (3 * l - 2);
  if (lst == 0) {
    printf("%lld %lld\n", sx, sy);
    return 0;
  } else {
    long long int b = lst / l;
    if (b < 5) {
      long long int tx = 0, ty = 0;
      for (int i = 0; i < b; i++) {
        tx += mv2[i][0];
        ty += mv2[i][1];
      }
      tx *= l;
      ty *= l;
      sx += tx;
      sy += ty;
      lst -= (b * l);
      sx += (mv2[b][0] * lst);
      sy += (mv2[b][1] * lst);
      printf("%lld %lld\n", sx, sy);
      return 0;
    } else {
      long long int tx = 0, ty = 0;
      for (int i = 0; i < 5; i++) {
        tx += mv2[i][0];
        ty += mv2[i][1];
      }
      tx *= l;
      ty *= l;
      sx += tx;
      sy += ty;
      lst -= (5 * l);
      if (lst) {
        sx += 1;
        sy += 2;
        lst--;
        if (lst) {
          sx += (lst * (-1));
          sy += (lst * 2);
        }
      }
      printf("%lld %lld\n", sx, sy);
      return 0;
    }
  }
}