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;
int dx[6] = {-1, -2, -1, 1, 2, 1};
int dy[6] = {2, 0, -2, -2, 0, 2};
int main() {
  long long n;
  scanf("%I64d", &n);
  if (n == 0)
    printf("0 0\n");
  else {
    long long d = 1;
    long long l = 1, r = (1LL << 31) - 1;
    while (l < r) {
      long long mid = (l + r) / 2;
      long long sum = mid * (mid + 1) / 2;
      if (sum <= n / 6)
        l = mid + 1;
      else
        r = mid;
    }
    n = n - r * (r - 1) * 3;
    d = r;
    if (n == 0) {
      n = n + 6 * (d - 1);
      d--;
    }
    int pos = 0;
    for (int i = 0; i < 6; i++) {
      if (n > d) {
        pos = (i + 1) % 6;
        n -= d;
      } else
        break;
    }
    long long x, y;
    if (pos == 0) x = d * 2, y = 0;
    if (pos == 1) x = d, y = d * 2;
    if (pos == 2) x = -d, y = d * 2;
    if (pos == 3) x = -d * 2, y = 0;
    if (pos == 4) x = -d, y = -d * 2;
    if (pos == 5) x = d, y = -d * 2;
    x = x + n * dx[pos];
    y = y + n * dy[pos];
    printf("%I64d %I64d\n", x, y);
  }
  return 0;
}