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;
using ll = long long;
ll dx[] = {1, -1, -2, -1, 1, 2};
ll dy[] = {2, 2, 0, -2, -2, 0};
ll cnt[] = {1, 0, 1, 1, 1, 1};
int main() {
  int i, j, k;
  ll x, y, cur;
  ll n;
  cin >> n;
  ll l, r, m, ans;
  l = 0, r = (ll)1e9;
  while (l < r) {
    m = (l + r + 1) / 2;
    long long tmp = m;
    tmp = tmp * (3 * m + 2);
    if (tmp > n)
      r = m - 1;
    else
      l = m;
  }
  x = y = 0;
  x = x + l * dx[4];
  y = y + l * dy[4];
  for (i = 0; i < 6; i++) {
    cnt[i] += l;
  }
  cur = l * (6 * l + 4) / 2;
  i = 0;
  while (cur < n) {
    ll d = min(cnt[i], n - cur);
    cur += d;
    x += dx[i] * d;
    y += dy[i] * d;
    cnt[i]++;
    i = (i + 1) % 6;
  }
  cout << x << " " << y << endl;
  return 0;
}