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 n;
bool check(long long mid) {
  long long res = 3 * (mid + 1) * mid;
  if (n > res)
    return 1;
  else
    return 0;
}
int main() {
  scanf(" %lld", &n);
  long long l = 0, r = 1e9, res;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (check(mid)) {
      res = mid + 1;
      l = mid + 1;
    } else {
      r = mid - 1;
    }
  }
  if (n == 0)
    printf("0 0\n");
  else {
    long long pos = 3 * (res + 1) * res;
    long long x = 2 * res, y = 0;
    if (pos - res <= n) {
      printf("%lld %lld\n", x - (pos - n), y - (pos - n) * 2);
    } else if (pos - 2 * res <= n) {
      x -= res, y -= res * 2;
      printf("%lld %lld\n", x - (pos - res - n) * 2, y);
    } else if (pos - 3 * res <= n) {
      x -= res + res * 2, y -= res * 2;
      printf("%lld %lld\n", x - (pos - res * 2 - n),
             y + (pos - res * 2 - n) * 2);
    } else if (pos - 4 * res <= n) {
      x -= res * 2 + res * 2;
      printf("%lld %lld\n", x + (pos - res * 3 - n),
             y + (pos - res * 3 - n) * 2);
    } else if (pos - 5 * res <= n) {
      x -= res + res * 2, y += res * 2;
      printf("%lld %lld\n", x + (pos - res * 4 - n) * 2, y);
    } else if (pos - 6 * res <= n) {
      x -= res, y += res * 2;
      printf("%lld %lld\n", x + (pos - res * 5 - n),
             y - (pos - res * 5 - n) * 2);
    }
  }
}