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 Find(long long l, long long r, long long n) {
  long long ans = 0;
  while (r >= l) {
    long long mid = (l + r) >> 1;
    if (3 * (mid + 1) * mid <= n) {
      ans = mid;
      l = mid + 1;
    } else
      r = mid - 1;
  }
  return ans;
}
int main() {
  long long n;
  scanf("%lld", &n);
  long long x, y;
  if (n == 0)
    x = 0, y = 0;
  else {
    long long r = 1000000000;
    long long t = Find(1, r, n);
    long long yu = n - 3 * t * (t + 1);
    t++;
    if (yu == 0)
      x = 2 * (t - 1), y = 0;
    else {
      long long tt = yu / t;
      yu = yu - tt * t;
      if (tt == 0)
        x = 2 * t - yu, y = 2 * yu;
      else if (tt == 1)
        x = t - yu * 2, y = 2 * t;
      else if (tt == 2)
        x = -t - yu, y = 2 * t - 2 * yu;
      else if (tt == 3)
        x = -2 * t + yu, y = -2 * yu;
      else if (tt == 4)
        x = -t + 2 * yu, y = -2 * t;
      else if (tt == 5)
        x = t + yu, y = -2 * t + 2 * yu;
      else
        x = 2 * t, y = 0;
    }
  }
  printf("%lld %lld\n", x, y);
  return 0;
}