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 long long MOD = (long long)1e9 + 7;
int movesx[7] = {1, -1, -2, -1, 1, 2};
int movesy[7] = {
    2, 2, 0, -2, -2, 0,
};
long long x = 0, y = 0;
void doWork(long long n) {
  long long a = -1, b = 1.e9, m, ar;
  while (b - a > 1) {
    m = (b + a) / 2;
    ar = (2 + 3 * m) * m;
    if (n >= ar) {
      a = m;
    } else {
      b = m;
    }
  }
  x += 1LL * a * movesx[4];
  y += 1LL * a * movesy[4];
  n -= (5 + 3 * (a - 1)) * a;
  long long t = a + 1;
  while (true) {
    for (int i = 0; i < 6; ++i) {
      if (i == 1) {
        if ((t - 1) <= n) {
          x += 1LL * (t - 1) * movesx[i];
          y += 1LL * (t - 1) * movesy[i];
          n -= (t - 1);
        } else {
          x += 1LL * n * movesx[i];
          y += 1LL * n * movesy[i];
          n = 0;
        }
        if (n == 0) return;
      } else {
        if (t <= n) {
          x += 1LL * t * movesx[i];
          y += 1LL * t * movesy[i];
          n -= t;
        } else {
          x += 1LL * n * movesx[i];
          y += 1LL * n * movesy[i];
          n = 0;
        }
        if (n == 0) return;
      }
    }
  }
}
int main() {
  long long n;
  cin >> n;
  doWork(n);
  cout << x << " " << y << endl;
}