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;
struct p {
  double x, y;
  p() {}
  p(double x, double y) : x(x), y(y) {}
  p operator+(p q) { return p(x + q.x, y + q.y); }
  p operator-(p q) { return p(x - q.x, y - q.y); }
  p operator*(double q) { return p(x * q, y * q); }
};
p f(long long n) {
  if (n == 0) return p(0, 0);
  long long a = 0ll, b = 1e9, c, m;
  while (a <= b) {
    c = (a + b) / 2ll;
    if (3ll * c * (c + 1ll) >= n) {
      m = c;
      b = c - 1ll;
    } else
      a = c + 1ll;
  }
  n = (n - 3ll * m * (m - 1ll)) % (6 * m);
  p h[6];
  h[0] = p(m * 2ll, 0);
  h[1] = p(m, m * 2ll);
  h[2] = p(-m, m * 2ll);
  h[3] = p(-m * 2ll, 0);
  h[4] = p(-m, -m * 2ll);
  h[5] = p(m, -m * 2ll);
  int u = floor((double)(n) / (double)(m)), v = ceil((double)(n) / (double)(m));
  double w = (double)(n % m) / (double)(m);
  return h[u % 6] + (h[v % 6] - h[u % 6]) * w;
}
int main() {
  long long n;
  cin >> n;
  p g = f(n);
  printf("%.0lf %.0lf\n", g.x, g.y);
  return 0;
}