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;
using LL = long long;
struct point {
  int x, y;
  point operator+(point a) { return {x + a.x, y + a.y}; }
  point operator*(int k) { return {k * x, k * y}; }
};
point dir(int c) {
  if (c == 0) return {1, 2};
  if (c == 1) return {-1, 2};
  if (c == 2) return {-2, 0};
  if (c == 3) return {-1, -2};
  if (c == 4) return {1, -2};
  if (c == 5) return {2, 0};
}
int main() {
  auto rt = [&](long double n) {
    long double a = 3, b = 2, c = 1 - n;
    long double d = b * b - 4 * a * c;
    return (-b + sqrt(d)) / (2 * a);
  };
  auto f = [&](int x) { return 3ll * x * x + 2 * x; };
  LL n;
  cin >> n;
  if (!n) {
    puts("0 0");
    return 0;
  }
  int x = int(rt(n));
  n -= f(x);
  int c = 0;
  for (; c < 6; c++) {
    if (x + (c != 1) >= n) break;
    n -= x + (c != 1);
  }
  point p;
  if (c == 0) p = {x, -2 * x};
  if (c == 1) p = {1 + 2 * x, 2};
  if (c == 2) p = {x + 1, (x + 1) * 2};
  if (c == 3) p = {-x - 1, (x + 1) * 2};
  if (c == 4) p = {-2 * (x + 1), 0};
  if (c == 5) p = {-x - 1, (x + 1) * (-2)};
  p = p + dir(c) * n;
  cout << p.x << " " << p.y << endl;
  return 0;
}