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;
vector<pair<long long, long long> > dir = {{-1, 2}, {-2, 0}, {-1, -2},
                                           {1, -2}, {2, 0},  {1, 2}};
const long long MAX = 1e9 + 18;
long long f(long long x) { return ((x * (x + 1)) / 2) * 6 + 1; }
pair<long long, long long> solve(long long n, long long flor) {
  if (flor == 0) return pair<long long, long long>(0, 0);
  pair<long long, long long> p{1 + 2 * (flor - 1), 2};
  bool d = true;
  for (auto [x, y] : dir) {
    int quant;
    if (d) {
      quant = min(n, flor - 1);
      d = false;
    } else {
      quant = min(n, flor);
    }
    n -= quant;
    p.first += x * quant;
    p.second += y * quant;
    if (n == 0) break;
  }
  return p;
}
long long busca(long long n) {
  long long esq = 0, dir = MAX, r = -1;
  while (esq <= dir) {
    long long mid = (esq + dir) / 2;
    if (f(mid) <= n) {
      r = mid;
      esq = mid + 1;
    } else
      dir = mid - 1;
  }
  return r + 1;
}
int main() {
  cout.sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  long long h = busca(n);
  long long res = n - f(h - 1);
  pair<long long, long long> r = solve(res, h);
  cout << r.first << " " << r.second << endl;
  return 0;
}