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;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long l = 0, r = 2e9;
  while (l + 1 < r) {
    long long m = (l + r) / 2;
    if (6 * m * (m + 1) / 2 <= n)
      l = m;
    else
      r = m;
  }
  if (6 * r * (r + 1) / 2 <= n) l = r;
  n -= 6 * l * (l + 1) / 2;
  long long x = 2 * l, y = 0;
  if (n == 0) return cout << x << " " << y, 0;
  x += 2;
  l++;
  if (n <= l) return cout << x - n << " " << y + 2 * n, 0;
  x -= l;
  y += 2 * l;
  n -= l;
  if (n <= l) return cout << x - 2 * n << " " << y, 0;
  x -= 2 * l;
  n -= l;
  if (n <= l) return cout << x - n << " " << y - 2 * n, 0;
  x -= l;
  y -= 2 * l;
  n -= l;
  if (n <= l) return cout << x + n << " " << y - 2 * n, 0;
  x += l;
  y -= 2 * l;
  n -= l;
  if (n <= l) return cout << x + 2 * n << " " << y, 0;
  x += 2 * l;
  n -= l;
  x += n;
  y += 2 * n;
  cout << x << " " << y;
}