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 main() {
  long long m = 0;
  cin >> m;
  long long i;
  long long n = m;
  long long a = 6;
  i = 2;
  if (m == 0) {
    cout << "0 0" << endl;
    return 0;
  }
  while (a < n && a > 0) {
    n = n - a;
    ++i;
    a = i * 6 - 6;
  }
  long long c = (i - 2);
  long long o = n - c;
  long long d = (n - (i - 1) + a) % a;
  long long s = d / (i - 1);
  long long b = d % (i - 1);
  long long ox, oy, x, y;
  switch (s) {
    case 0:
      ox = 1 * (i - 1), oy = 2 * (i - 1);
      x = ox - b * 2;
      y = oy;
      break;
    case 1:
      ox = -1 * (i - 1), oy = 2 * (i - 1);
      x = ox - b * 1;
      y = oy - b * 2;
      break;
    case 2:
      ox = -2 * (i - 1), oy = 0;
      x = ox + b * 1;
      y = oy - b * 2;
      break;
    case 3:
      ox = -1 * (i - 1), oy = -2 * (i - 1);
      x = ox + b * 2;
      y = oy;
      break;
    case 4:
      ox = 1 * (i - 1), oy = -2 * (i - 1);
      x = ox + b * 1;
      y = oy + b * 2;
      break;
    case 5:
      ox = 2 * (i - 1), oy = 0;
      x = ox - b * 1;
      y = oy + b * 2;
      break;
  }
  cout << x << " " << y << endl;
  return 0;
}