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;
const long long B = 1000000000;
int main() {
  long long n;
  cin >> n;
  if (n == 0) {
    printf("0 0\n");
    return 0;
  }
  long long st = 0, en = B;
  while (st + 1 < en) {
    long long mid = (st + en) >> 1;
    long long nm = 3ll * (1ll + mid) * mid;
    if (nm >= n)
      en = mid;
    else
      st = mid;
  }
  long long num = n - 3ll * (1ll + st) * st;
  if (num == en * 6ll)
    printf("%I64d 0\n", 2ll * en);
  else if (num == 1)
    printf("%I64d 2\n", 2ll * st + 1);
  else if (num <= en)
    printf("%I64d %I64d\n", 2ll * st + 1 - (num - 1), num * 2ll);
  else if (num <= 2ll * en)
    printf("%I64d %I64d\n", en - 2ll * (num - en), en * 2);
  else if (num <= 3ll * en)
    printf("%I64d %I64d\n", -2ll * en + (3ll * en - num),
           (en - (num - en * 2ll)) * 2ll);
  else if (num <= 4ll * en)
    printf("%I64d %I64d\n", -2ll * en + (num - 3ll * en),
           -(num - 3ll * en) * 2ll);
  else if (num <= 5ll * en)
    printf("%I64d %I64d\n", -2ll * en + en + 2ll * (num - 4ll * en), -en * 2ll);
  else if (num <= 6ll * en)
    printf("%I64d %I64d\n", en + (num - en * 5ll),
           (-en + (num - en * 5ll)) * 2ll);
  return 0;
}