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;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long n;
  cin >> n;
  long long complete = -1;
  long long L = 0, R = (1e9);
  while (L <= R) {
    long long mid = (L + R) / 2;
    long long temp = (mid) * (5 + (mid - 1) * 3);
    if (temp <= n) {
      complete = max(complete, mid);
      L = mid + 1;
    } else {
      R = mid - 1;
    }
  }
  long long rem = complete * (5 + 3 * (complete - 1));
  rem = n - rem;
  vector<long long> v;
  v.push_back(complete + 1);
  v.push_back(complete);
  for (long long i = 1; i <= 4; i++) {
    v.push_back(complete + 1);
  }
  pair<long long, long long> pa[] = {{1, 2},   {-1, 2}, {-2, 0},
                                     {-1, -2}, {1, -2}, {2, 0}};
  long long ansx = complete;
  long long ansy = -2 * complete;
  long long i;
  for (i = 0; i < 6; i++) {
    if (rem >= v[i]) {
      ansx += pa[i].first * v[i];
      ansy += pa[i].second * v[i];
      rem -= v[i];
    } else {
      break;
    }
  }
  if (rem > 0) {
    ansx += pa[i].first * rem;
    ansy += pa[i].second * rem;
  }
  cout << ansx << " " << ansy << "\n";
}