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 bs(long long n) {
  long long l = 0, r = 1e9, mid, ans = -1;
  while (l < r) {
    mid = (l + r) / 2;
    if ((long long)3 * mid * (mid + 1) <= n) {
      l = mid + 1;
      ans = mid;
    } else {
      r = mid;
    }
  }
  return ans;
}
int main() {
  long long num, x = 0, y = 0;
  cin >> num;
  if (num) {
    long long pos = bs(num);
    num -= 3 * (pos) * (pos + 1);
    if (num == 0) {
      y = 0;
      x = 2 * (pos);
    } else {
      pos++;
      long long hexedge = num / pos;
      long long pointnumber = num % pos;
      if (hexedge == 0)
        y = 2 * pointnumber, x = 2 * pos - pointnumber;
      else if (hexedge == 1)
        x = pos - 2 * pointnumber, y = 2 * pos;
      else if (hexedge == 2)
        y = 2 * pos - 2 * pointnumber, x = -pos - pointnumber;
      else if (hexedge == 3) {
        y = -2 * pointnumber, x = -2 * pos + pointnumber;
      } else if (hexedge == 4)
        x = -pos + 2 * pointnumber, y = -2 * pos;
      else if (hexedge == 5)
        x = pos + pointnumber, y = -2 * pos + 2 * pointnumber;
    }
  }
  cout << x << " " << y << endl;
}