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 main() {
  long long n;
  while (scanf("%I64d", &n) != EOF) {
    long long x, y, l, h, mid;
    l = 0, h = 1e18 + 7;
    while (l < h - 1) {
      mid = (l + h) >> 1;
      if (n / (3 * mid) >= mid + 1)
        l = mid;
      else
        h = mid;
    }
    x = 2 * l;
    y = 0;
    long long ret = n - 3 * l * (l + 1);
    l++;
    if (ret >= 1) {
      x++;
      y += 2;
      if (ret <= l) {
        x -= ret - 1;
        y += 2 * (ret - 1);
      } else {
        x -= l - 1;
        y += 2 * (l - 1);
        if (ret <= 2 * l) {
          x -= 2 * (ret - l);
        } else {
          x -= 2 * l;
          if (ret <= 3 * l) {
            x -= ret - 2 * l;
            y -= 2 * (ret - 2 * l);
          } else {
            x -= l;
            y -= 2 * l;
            if (ret <= 4 * l) {
              x += ret - 3 * l;
              y -= 2 * (ret - 3 * l);
            } else {
              x += l;
              y -= 2 * l;
              if (ret <= 5 * l) {
                x += 2 * (ret - 4 * l);
              } else {
                x += 2 * l;
                x += ret - 5 * l;
                y += 2 * (ret - 5 * l);
              }
            }
          }
        }
      }
    }
    printf("%I64d %I64d\n", x, y);
  }
  return 0;
}