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 int INF = INT_MAX;
const long long INFL = LLONG_MAX;
const long double pi = acos(-1);
long long n;
int main() {
  ios_base::sync_with_stdio(0);
  cout.precision(15);
  cout << fixed;
  cout.tie(0);
  cin.tie(0);
  cin >> n;
  long long bad = 0;
  long long good = INF;
  while (bad + 1 < good) {
    long long mid = (bad + good) / 2;
    if (3ll * mid * (mid + 1) < n) {
      bad = mid;
    } else {
      good = mid;
    }
  }
  good = bad;
  n -= 3 * good * (good + 1);
  long long X = good + 1;
  if (n == 0) {
    cout << (2 * good) << " " << 0 << '\n';
    return 0;
  }
  n--;
  long long curX = 2 * good + 1;
  long long curY = 2;
  if (n <= good) {
    cout << (curX - n) << " " << (curY + 2 * n) << '\n';
    return 0;
  }
  n -= good;
  curX = curX - good;
  curY = curY + 2 * good;
  if (n <= X) {
    cout << curX - 2 * n << " " << curY << '\n';
    return 0;
  }
  n -= X;
  curX -= 2 * X;
  if (n <= X) {
    cout << curX - n << " " << curY - 2 * n << '\n';
    return 0;
  }
  n -= X;
  curX -= X;
  curY -= 2 * X;
  if (n <= X) {
    cout << curX + n << " " << curY - 2 * n << '\n';
    return 0;
  }
  n -= X;
  curX += X;
  curY -= 2 * X;
  if (n <= X) {
    cout << curX + 2 * n << " " << curY << '\n';
    return 0;
  }
  curX += 2 * X;
  n -= X;
  cout << curX + n << " " << curY + 2 * n << '\n';
}