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 ax[6] = {1, -1, -2, -1, 1, 2};
int ay[6] = {2, 2, 0, -2, -2, 0};
int bx[6] = {2, 1, -1, -2, -1, 1};
int by[6] = {0, 2, 2, 0, -2, -2};
int cx[6] = {-1, -2, -1, 1, 2, 1};
int cy[6] = {2, 0, -2, -2, 0, 2};
int main() {
  long long n;
  scanf("%I64d", &n);
  if (n == 0) {
    printf("0 0\n");
    return 0;
  }
  long long tmp1 = n / 3;
  long long tmp2 = sqrt(tmp1);
  long long tmp3;
  for (long long i = tmp2 - 1; i <= tmp2 + 1; i++) {
    if (3 * i * (i - 1) + 1 <= n && n <= 3 * i * (i + 1)) {
      tmp3 = i;
      break;
    }
  }
  long long tmp4 = n - (3 * (tmp3 - 1) * tmp3) - 1;
  long long tmp5 = tmp4 / tmp3;
  long long tmp6 = tmp4 % tmp3;
  long long x = ax[tmp5] + bx[tmp5] * (tmp3 - 1) + cx[tmp5] * tmp6;
  long long y = ay[tmp5] + by[tmp5] * (tmp3 - 1) + cy[tmp5] * tmp6;
  printf("%I64d %I64d\n", x, y);
  return 0;
}