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;
int ax[10] = {1, -1, -2, -1, 1, 2};
int ay[10] = {2, 2, 0, -2, -2, 0};
string init[8] = {"0 0", "1 2", "-1 2", "-2 0", "-1 -2", "1 -2", "2 0"};
long long length[6];
int searching() {
  long long mid = 0;
  long long l = 1, r = 1e9, temp = 0;
  while (l < r) {
    mid = (l + r) / 2;
    if (6 * (mid) * (mid + 1) / 2 - mid <= n) {
      temp = mid;
      l = mid + 1;
    } else
      r = mid;
  }
  return l - 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  long long cir = searching();
  n -= cir * (cir + 1) * 3 - cir;
  int x = cir, y = -2 * cir;
  if (cir == 0) {
    cout << init[n];
    return 0;
  }
  cir++;
  for (int i = 0; i < 6; i++) length[i] = cir;
  length[1] -= 1;
  for (int i = 0; i < 6; i++) {
    if (n - length[i] > 0) {
      x += ax[i] * (length[i]);
      y += ay[i] * (length[i]);
      n -= length[i];
    } else {
      x += ax[i] * n;
      y += ay[i] * n;
      break;
    }
  }
  cout << x << " " << y;
}