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 di[6][2] = {{-1, 2}, {-2, 0}, {-1, -2}, {1, -2}, {2, 0}, {1, 2}};
int main() {
  ios::sync_with_stdio(false);
  cout.setf(ios::fixed);
  cout.precision(20);
  long long n;
  cin >> n;
  if (n == 0) return 0 * puts("0 0");
  long long l = 0, r = 2139062143, mid;
  while (l < r) {
    mid = l + (r - l + 1 >> 1);
    if (3 * (1 + mid) * mid < n)
      l = mid;
    else
      r = mid - 1;
  }
  pair<long long, long long> cnt = {(l + 1) * 2 - 1, 2};
  n -= 3 * (1 + l) * l + 1;
  int d = 0;
  long long k = l;
  while (n) {
    if (k == 0) {
      d = (d + 1) % 6;
      k = l + 1;
    }
    long long step = (k < n ? k : n);
    cnt = {cnt.first + di[d][0] * (k < n ? k : n),
           cnt.second + di[d][1] * (k < n ? k : n)};
    k -= step;
    n -= step;
  }
  cout << cnt.first << ' ' << cnt.second << '\n';
  return 0;
}