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;
long long gcd(long long a, long long b) {
  long long r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long fpow(long long n, long long k, int p = (int)1e9 + 7) {
  long long r = 1;
  for (; k; k >>= 1) {
    if (k & 1) r = r * n % p;
    n = n * n % p;
  }
  return r;
}
const int MOD = (int)1e9 + 7;
const int INF = (int)1e9;
const long long LINF = (long long)1e18;
const long double PI = 2 * acos((long double)0);
void solve() {
  long long n;
  scanf("%I64d", &n);
  if (n == 0) {
    printf("%d %d", 0, 0);
    return;
  }
  long long l = 0, r = 600000000LL;
  while (l < r) {
    long long m = (l + r + 1) >> 1;
    if (3 * m * (m - 1) + 1 < n)
      l = m;
    else
      r = m - 1;
  }
  long long d = n - 3 * l * (l - 1);
  if (d < l) {
    printf("%I64d %I64d", 2 * l - d, 2 * d);
  } else if (d < 2 * l) {
    d -= l;
    printf("%I64d %I64d", l - 2 * d, 2 * l);
  } else if (d < 3 * l) {
    d -= 2 * l;
    printf("%I64d %I64d", -l - d, 2 * l - 2 * d);
  } else if (d < 4 * l) {
    d -= 3 * l;
    printf("%I64d %I64d", -2 * l + d, -2 * d);
  } else if (d < 5 * l) {
    d -= 4 * l;
    printf("%I64d %I64d", -l + 2 * d, -2 * l);
  } else {
    d -= 5 * l;
    printf("%I64d %I64d", l + d, -2 * l + 2 * d);
  }
}
int main() {
  solve();
  return 0;
}