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 int N = 100000;
const int inf = (int)1e9 + 1;
const long long big = (long long)1e18 + 1;
const int P = 239;
const int MOD = (int)1e9 + 7;
const int MOD1 = (int)1e9 + 9;
const double eps = 1e-9;
const double pi = atan2(0, -1);
const int ABC = 26;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(20);
  long long n;
  cin >> n;
  long long l = 0, r = 1500000000, mid;
  while (r - l > 1) {
    mid = (l + r) / 2;
    if (mid * (mid + 1) * 3 <= n)
      l = mid;
    else
      r = mid;
  }
  long long cnt[6] = {0, 0, 0, 0, 0, 0};
  long long dx[6] = {1, -1, -2, -1, 1, 2};
  long long dy[6] = {2, 2, 0, -2, -2, 0};
  cnt[5] += l;
  n -= l * (l + 1) * 3;
  if (n > 0) {
    cnt[0]++;
    n--;
  }
  long long d;
  d = min(l, n);
  cnt[1] += d;
  n -= d;
  d = min(l + 1, n);
  cnt[2] += d;
  n -= d;
  d = min(l + 1, n);
  cnt[3] += d;
  n -= d;
  d = min(l + 1, n);
  cnt[4] += d;
  n -= d;
  d = min(l + 1, n);
  cnt[5] += d;
  n -= d;
  d = min(l + 1, n);
  cnt[0] += d;
  n -= d;
  long long x = 0, y = 0;
  for (int i = 0; i < 6; i++) {
    x += dx[i] * cnt[i];
    y += dy[i] * cnt[i];
  }
  cout << x << " " << y << "\n";
  return 0;
}