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;
inline char nc() {
  static char buf[1000000], *p1, *p2;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1000000, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
template <typename T>
inline int scan(T &x) {
  char c, sign = 1;
  while (!isdigit(c = nc()) && c != EOF)
    if (c == '-') sign *= -1;
  if (c == EOF) return EOF;
  for (x = 0; isdigit(c); c = nc()) x = (x << 1) + (x << 3) + (c & 15);
  return x *= sign, 1;
}
template <typename T, typename... Args>
inline int scan(T &x, Args &...args) {
  return scan(x), scan(args...);
}
int dx[] = {-1, -2, -1, 1, 2, 1};
int dy[] = {2, 0, -2, -2, 0, 2};
int xx[] = {0, 1, -1, -2, -1, 1, 2};
int yy[] = {0, 2, 2, 0, -2, -2, 0};
long long calc(int d) { return (6LL + 6LL * d) * d / 2; }
int main() {
  long long n;
  while (cin >> n) {
    if (!n) return 0 * puts("0 0");
    if (n <= 6) {
      cout << xx[n] << ' ' << yy[n] << endl;
      continue;
    }
    long long k = 6, now = 6, d = 1, x = 1, y = 2;
    long long L = 1, R = 600000000, mid;
    while (L <= R) {
      mid = (L + R) >> 1;
      if (calc(mid) >= n)
        R = mid - 1, d = mid;
      else
        L = mid + 1;
    }
    x = 2LL * d - 1;
    now = calc(d - 1);
    n -= 1 + now;
    for (int i = 0; n > 0 && i < 6; ++i) {
      long long tp = min(d, n);
      if (!i && tp == d) --tp;
      x += tp * dx[i], y += tp * dy[i];
      n -= tp;
    }
    cout << x << ' ' << y << endl;
  }
}