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>
long long n, t, x, y, w, tX, tY;
bool Q = false;
long long Bs(long long l, long long r, long long x) {
  if (l == r) return l;
  long long mid = (l + r + 1) / 2;
  if ((mid * (3 * mid - 2)) > x)
    return Bs(l, mid - 1, x);
  else
    return Bs(mid, r, x);
}
void go(long long &x, long long &y, int k, long long p) {
  if (k == 1) x -= p * 2;
  if (k == 2) {
    x -= p;
    y -= p * 2;
  }
  if (k == 3) {
    x += p;
    y -= p * 2;
  }
  if (k == 4) x += p * 2;
  if (k == 5) {
    x += p;
    y += p * 2;
  }
  if (k == 6) {
    x -= p;
    y += p * 2;
  }
  w += p;
}
int main() {
  std::cin >> n;
  t = Bs(0LL, 1000000000LL, n);
  x = t;
  y = t * 2;
  w = (t * (3 * t - 2));
  for (int i = 1; i <= 4 && w < n; i++)
    if (w + t <= n)
      go(x, y, i, t);
    else
      go(x, y, i, n - w);
  if (w + t < n)
    go(x, y, 5, t + 1);
  else
    go(x, y, 5, n - w);
  if (w < n) go(x, y, 6, n - w);
  std::cout << x << " " << y << std::endl;
  return 0;
}