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 int x, y;
int main() {
  long long int n, p = 1, c, b;
  double d;
  cin >> n;
  if (n == 0) {
    x = 0;
    y = 0;
  } else {
    b = (n - 1) / 6;
    d = sqrt(double(b * 2));
    for (p = int(d);; p++) {
      if (b - p * (p + 1) / 2 < 0) break;
    }
    n = n - 6 * p * (p - 1) / 2;
    c = n / p;
    n = n % p;
    if (c == 0) {
      x = 2 * p - n;
      y = 0 + 2 * n;
    }
    if (c == 1) {
      x = p - 2 * n;
      y = 2 * p;
    }
    if (c == 2) {
      x = -p - n;
      y = 2 * p - 2 * n;
    }
    if (c == 3) {
      x = -2 * p + n;
      y = 0 - 2 * n;
    }
    if (c == 4) {
      x = -p + 2 * n;
      y = -2 * p;
    }
    if (c == 5) {
      x = p + n;
      y = -2 * p + 2 * n;
    }
    if (c == 6) {
      x = 2 * p;
      y = 0;
    }
  }
  cout << x << " " << y << endl;
  return 0;
}