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 dirs[6][2] = {{-1, 2}, {-2, 0}, {-1, -2}, {1, -2}, {+2, 0}, {1, 2}};
int main() {
  long long n;
  while (cin >> n) {
    long long lo = 0, hi = 1000000000;
    while (lo + 1 < hi) {
      long long mid = (lo + hi) >> 1;
      if (3 * mid * (mid + 1) > n) {
        hi = mid - 1;
      } else
        lo = mid;
    }
    if (3 * hi * (hi + 1) > n) {
      hi--;
    }
    n -= 3 * hi * (hi + 1);
    long long x = 2 * hi, y = 0;
    if (n) {
      x++, y = 2;
      long long pos = n / (hi + 1);
      long long until = n % (hi + 1);
      for (int i = int(0); i < int(pos); i++) {
        if (!i) {
          x -= dirs[0][0];
          y -= dirs[0][1];
        }
        x += dirs[i][0] * (hi + 1);
        y += dirs[i][1] * (hi + 1);
      }
      if (!pos) until--;
      x += until * dirs[pos][0];
      y += until * dirs[pos][1];
    }
    cout << x << " " << y << endl;
  }
  return 0;
}