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>
const int INF = 1 << 30;
inline long long read() {
  long long x = 0;
  bool f = false;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = true;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) + ch - '0';
    ch = getchar();
  }
  if (f) return -x;
  return x;
}
const int D = 50;
inline long long min(long long x, long long y) { return x < y ? x : y; }
int main() {
  long long n = read(), x, y, m;
  long long left = 0, right = 1000000000;
  while (left + 1 < right) {
    long long mid = (left + right) >> 1;
    long long temp = mid * (mid + 1) * 3;
    if (temp <= n)
      left = mid;
    else
      right = mid;
  }
  if (right * (right + 1) * 3 <= n)
    m = right;
  else
    m = left;
  n -= m * (m + 1) * 3;
  if (n > 0) m++;
  x = m * 2, y = 0;
  long long step;
  step = min(n, m);
  x -= step, y += step * 2, n -= step;
  step = min(n, m);
  x -= step * 2, n -= step;
  step = min(n, m);
  x -= step, y -= step * 2, n -= step;
  step = min(n, m);
  x += step, y -= step * 2, n -= step;
  step = min(n, m);
  x += step * 2, n -= step;
  step = min(n, m);
  x += step, y += step * 2, n -= step;
  printf("%I64d %I64d", x, y);
  return 0;
}