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;
long long N;
long long maxl = 1e9;
long long dx[6] = {-1, -2, -1, 1, 2, 1}, dy[6] = {2, 0, -2, -2, 0, 2};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N;
  if (N == 0) {
    cout << 0 << ' ' << 0 << '\n';
    return 0;
  }
  long long l = 0, r = maxl;
  while (l + 1 < r) {
    long long m = (l + r) / 2;
    if (3 * m * (m + 1) >= N)
      r = m;
    else
      l = m;
  }
  long long id = r;
  N -= (3 * (id - 1) * id + 1);
  long long x = 1 + (id - 1) * 2, y = 2;
  for (int i = 1; i <= 6; i++) {
    if (i == 1) {
      if (N > id - 1) {
        N -= (id - 1);
        x += dx[i - 1] * (id - 1);
        y += dy[i - 1] * (id - 1);
      } else {
        x += dx[i - 1] * N;
        y += dy[i - 1] * N;
        cout << x << ' ' << y << '\n';
        return 0;
      }
    } else {
      if (N > id) {
        N -= id;
        x += dx[i - 1] * id;
        y += dy[i - 1] * id;
      } else {
        x += dx[i - 1] * N;
        y += dy[i - 1] * N;
        cout << x << ' ' << y << '\n';
        return 0;
      }
    }
  }
  assert(0);
  return 0;
}