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;
const double pi = 3.141592653;
const long long infi = 1000000001;
const long long MOD = 1000000007;
const long long mod = 998244353;
const string no = "NO\n", yes = "YES\n";
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t = 1;
  long long n, m, i, l, r, d, bank, s, k, j, x, y, ans, q;
  while (t--) {
    ans = 0;
    cin >> n;
    l = 0;
    r = 1e9;
    s;
    while (l <= r) {
      long long mid = (r - l) / 2 + l;
      d = mid * (3 * mid + 2);
      if (d <= n) {
        s = mid;
        l = mid + 1;
      } else {
        r = mid - 1;
      }
    }
    d = n - s * (3 * s + 2);
    x = s;
    y = -2 * s;
    l = s + 1;
    for (i = 0; i < 6; i++) {
      if (!d) break;
      if (i == 0) {
        if (d > l) {
          d -= l;
          x += l;
          y += (2 * l);
        } else {
          x += d;
          y += (2 * d);
          break;
        }
      } else if (i == 1) {
        if (d > l - 1) {
          d -= (l - 1);
          x -= (l - 1);
          y += 2 * (l - 1);
        } else {
          x -= d;
          y += 2 * d;
          break;
        }
      } else if (i == 2) {
        if (d > l) {
          d -= l;
          x -= 2 * l;
        } else {
          x -= 2 * d;
          break;
        }
      } else if (i == 3) {
        if (d > l) {
          d -= l;
          x -= l;
          y -= 2 * l;
        } else {
          x -= d;
          y -= 2 * d;
          break;
        }
      } else if (i == 4) {
        if (d > l) {
          d -= l;
          x += l;
          y -= 2 * l;
        } else {
          x += d;
          y -= 2 * d;
          break;
        }
      } else {
        x += 2 * d;
      }
    }
    cout << x << ' ' << y << endl;
  }
  return 0;
}