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() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(10);
  cout << fixed;
  srand(time(0));
  auto print = [&](long long x, long long y) {
    cout << x << " " << y;
    exit(0);
  };
  long long n;
  cin >> n;
  if (n == 0) {
    cout << "0 0";
    return 0;
  }
  long long l = 0, r = 1e9, a = 0;
  while (l <= r) {
    long long mid = (l + r) / 2;
    long long x = (mid * (mid + 1) / 2) * 6;
    if (x < n) {
      a = mid;
      l = mid + 1;
    } else {
      r = mid - 1;
    }
  }
  a++;
  long long b = (n - (a * (a - 1) / 2) * 6) - 1;
  long long x = 1 + 2 * (a - 1);
  long long y = 2;
  if (b > (a - 1)) {
    b -= (a - 1);
    x = x - (a - 1);
    y = y + 2 * (a - 1);
  } else {
    x = x - b;
    y = y + 2 * b;
    print(x, y);
  }
  if (b > a) {
    b -= a;
    x = x - 2 * a;
    y = y;
  } else {
    x = x - 2 * b;
    y = y;
    print(x, y);
  }
  if (b > a) {
    b -= a;
    x = x - a;
    y = y - 2 * a;
  } else {
    x = x - b;
    y = y - 2 * b;
    print(x, y);
  }
  if (b > a) {
    b -= a;
    x = x + a;
    y = y - 2 * a;
  } else {
    x = x + b;
    y = y - 2 * b;
    print(x, y);
  }
  if (b > a) {
    b -= a;
    x = x + 2 * a;
    y = y;
  } else {
    x = x + 2 * b;
    y = y;
    print(x, y);
  }
  if (b > a) {
    b -= a;
    x = x + a;
    y = y + 2 * a;
  } else {
    x = x + b;
    y = y + 2 * b;
    print(x, y);
  }
  return 0;
}