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;
const int maxn = 1e5 + 10;
const int inf = 0xfffffff;
const int mod = 1e9 + 7;
const double pi = acos(-1);
inline void open(string s) {
  freopen((s + ".in").c_str(), "r", stdin);
  freopen((s + ".out").c_str(), "w", stdout);
}
int main() {
  long long n, x, y;
  scanf("%I64d", &n);
  long long d = sqrt(n / 3);
  while (3 * d * (d + 1) <= n) d++;
  long long left = n - (3 * d * (d - 1));
  long long pos = left / d, m = left % d;
  if (pos == 0) {
    x = 2 * d - m, y = 2 * m;
    if (y == 0) x -= 2;
  } else if (pos == 1)
    x = d - 2 * m, y = 2 * d;
  else if (pos == 2)
    x = 0LL - d - m, y = 2 * d - 2 * m;
  else if (pos == 3)
    x = 0LL - 2 * d + m, y = 0LL - 2 * m;
  else if (pos == 4)
    x = 0LL - d + 2 * m, y = 0LL - 2 * d;
  else if (pos == 5)
    x = d + m, y = 2 * m - 2 * d;
  printf("%I64d %I64d\n", x, y);
  return 0;
}