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 mod = 1e9 + 7, a[300000];
long long binpow(long long x, long long y) {
  if (y == 0) return 1;
  if (y % 2) return x * binpow(x, y - 1) % mod;
  long long t = binpow(x, y / 2);
  return t * t % mod;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  if (n == 0) {
    cout << "0 0";
    return 0;
  }
  if (n == 1) {
    cout << "1 2" << endl;
    return 0;
  }
  n -= 1;
  long long l = 0, r = 1e9;
  while (r - l > 1) {
    long long mid = (r + l) / 2;
    if (6 * mid * (mid + 1) / 2 + mid > n)
      r = mid - 1;
    else
      l = mid;
  }
  if (6 * r * (r + 1) / 2 + r <= n) l = r;
  n -= 6 * l * (l + 1) / 2 + l;
  l++;
  if (n < l) {
    cout << l - 2 * n << " " << 2 * l << endl;
    return 0;
  }
  n -= l;
  if (n < l) {
    cout << -l - n << " " << 2 * (l - n);
    return 0;
  }
  n -= l;
  if (n < l) {
    cout << -2 * l + n << " " << -2 * n;
    return 0;
  }
  n -= l;
  if (n < l) {
    cout << 2 * n - l << " " << -2 * l;
    return 0;
  }
  n -= l;
  if (n < l + 1) {
    cout << l + n << " " << -2 * l + 2 * n;
    return 0;
  }
  n -= l + 1;
  cout << 2 * l + 1 - n << " " << 2 + 2 * n;
}