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 M = (long long)1e9;
int main() {
  long long n, low = -1, high, temp1, temp2;
  cin >> n;
  if (n == 0) {
    cout << 0 << ' ' << 0 << endl;
    return 0;
  }
  high = min(n, M);
  while (high - low > 1) {
    long long mid = (low + high) / 2;
    if (3 * mid * (mid + 1) > n)
      high = mid;
    else
      low = mid;
  }
  temp1 = n - 3 * low * (low + 1);
  temp2 = temp1 % (low + 1);
  temp1 /= low + 1;
  if (temp1 == 0) {
    if (temp2 == 0)
      cout << 2 * low << ' ' << 0 << endl;
    else
      cout << 2 * (low + 1) - temp2 << ' ' << temp2 * 2 << endl;
  }
  if (temp1 == 1) cout << low + 1 - temp2 * 2 << ' ' << (low + 1) * 2 << endl;
  if (temp1 == 2)
    cout << -low - 1 - temp2 << ' ' << (low + 1) * 2 - temp2 * 2 << endl;
  if (temp1 == 3) cout << -(low + 1) * 2 + temp2 << ' ' << -temp2 * 2 << endl;
  if (temp1 == 4) cout << -low - 1 + temp2 * 2 << ' ' << -(low + 1) * 2 << endl;
  if (temp1 == 5)
    cout << low + 1 + temp2 << ' ' << -(low + 1) * 2 + temp2 * 2 << endl;
  return 0;
}