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;
template <class T>
inline void amin(T &a, const T &b) {
  if (b < a) a = b;
}
template <class T>
inline void amax(T &a, const T &b) {
  if (a < b) a = b;
}
const long long dx[] = {-1, -2, -1, 1, 2, 1};
const long long dy[] = {+2, 0, -2, -2, 0, +2};
long long N;
int main() {
  scanf("%lld", &N);
  long long lo = 0, hi = 1e9;
  while (hi - lo > 1) {
    long long m = (hi + lo) / 2;
    if (m * (m + 1) * 3 > N)
      hi = m;
    else
      lo = m;
  }
  N -= lo * (lo + 1) * 3;
  if (N == 0) {
    printf("%lld 0\n", 2 * lo);
  } else {
    long long x = 2 * lo + 2, y = 0;
    for (int d = 0, d_len = (6); d < d_len; ++d) {
      long long g = min(N, hi);
      x += dx[d] * g;
      y += dy[d] * g;
      N -= g;
    }
    printf("%lld %lld\n", x, y);
  }
  return 0;
}