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 dx[]{-1, -2, -1, 1, 2, 1};
int dy[]{2, 0, -2, -2, 0, 2};
long long steps;
long long find_circle(long long step) {
  long long int l = 1, r = 6e8;
  while (l < r) {
    int m = (l + r + 1) / 2;
    long long total = ((1LL * m - 1) * (1LL * m) * 3);
    if (total == step) return m - 1;
    if (step < total)
      r = m - 1;
    else
      l = m;
  }
  return l;
}
vector<long long> coordinate(int cir) {
  long long went;
  went = (1LL * cir) * (1LL * cir - 1) * 3;
  steps -= went;
  long long x = 2 * (cir - 1);
  long long y = 0;
  vector<long long> ans;
  ans.push_back(x);
  ans.push_back(y);
  return ans;
}
int main() {
  cin >> steps;
  if (steps == 0) {
    cout << "0 0";
    return 0;
  }
  long long int pre = find_circle(steps);
  long long x, y;
  vector<long long> cac;
  cac = coordinate(pre);
  pre++;
  x = cac[0];
  y = cac[1];
  x += 2;
  int direct = 0;
  int k = 6;
  while (k-- && steps) {
    x += min(pre - 1, steps) * dx[direct];
    y += min(pre - 1, steps) * dy[direct];
    steps -= min(pre - 1, steps);
    direct++;
  }
  cout << x << " " << y;
}