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 mod = 1e9 + 7;
const int inf = 1e9;
long long powm(long long a, long long p, long long m) {
  long long r = 1 % m;
  while (p) {
    if (p & 1) r = r * a % m;
    p >>= 1;
    a = a * a % m;
  }
  return r;
}
int main() {
  long long n;
  cin >> n;
  long long a = 0, b = inf;
  while (b - a > 1) {
    long long m = (a + b) / 2;
    if (3ll * m * (m - 1) < n)
      a = m;
    else
      b = m;
  }
  n -= 3ll * a * (a - 1) + 1;
  long long dx[] = {2, 1, -1, -2, -1, 1}, dy[] = {0, 2, 2, 0, -2, -2},
            s[] = {-1, -2, -1, 1, 2, 1};
  for (int i = 0, j = 1; i < 6 && n >= 0; ++i, j = (j + 1) % 6) {
    long long x0 = dx[i] * a;
    long long y0 = dy[i] * a;
    long long x1 = dx[j] * a;
    long long y1 = dy[j] * a;
    long long cnt = (x1 - x0) / s[i];
    if (cnt > n) {
      long long x = (n + 1) * s[i] + x0;
      cout << x << ' ' << (y1 - y0) * (x - x0) / (x1 - x0) + y0 << endl;
      return 0;
    }
    n -= cnt;
  }
  puts("0 0");
  return 0;
}