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 cal(long long u) { return u * (u - 1) * 3; }
int main() {
  long long n;
  while (scanf("%I64d", &n) != EOF) {
    if (n == 0) {
      printf("0 0\n");
      continue;
    }
    long long tn = n;
    long long dis = sqrt(1.0 * n / 3) + 3;
    while (cal(dis - 1) >= n) dis--;
    n -= cal(dis - 1);
    int flag = 0;
    int f = 1;
    while (n) {
      long long dx = 0;
      dx = dis - 1;
      if (n > dx)
        n -= dx, flag++;
      else
        break;
    }
    dis -= 1;
    long long x, y, tx, ty;
    if (flag == 0)
      x = 2 * dis, y = 0, tx = -1, ty = 2;
    else if (flag == 1)
      x = dis, y = 2 * dis, tx = -2, ty = 0;
    else if (flag == 2)
      x = -dis, y = 2 * dis, tx = -1, ty = -2;
    else if (flag == 3)
      x = -2 * dis, y = 0, tx = 1, ty = -2;
    else if (flag == 4)
      x = -dis, y = -2 * dis, tx = 2, ty = 0;
    else
      x = dis, y = -2 * dis, tx = 1, ty = 2;
    x += tx * n;
    y += ty * n;
    printf("%I64d %I64d\n", x, y);
  }
  return 0;
}