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 dx[] = {-1, -2, -1, 1, 2, 1};
long long dy[] = {2, 0, -2, -2, 0, 2};
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n, m;
  cin >> n;
  m = (sqrt(4 * (n / 3) + 1) - 1) / 2;
  while (m * (m + 1) * 3 < n) m++;
  if (n == 3 * m * (m + 1)) {
    cout << 2 * m << " 0";
    exit(0);
  }
  n -= 3 * m * (m - 1);
  long long x = 2 * m, y = 0;
  if (n >= m) x = m, y = 2 * m;
  if (n >= 2 * m) x = -m, y = 2 * m;
  if (n >= 3 * m) x = -2 * m, y = 0;
  if (n >= 4 * m) x = -m, y = -2 * m;
  if (n >= 5 * m) x = m, y = -2 * m;
  x += (n % m) * dx[n / m];
  y += (n % m) * dy[n / m];
  cout << x << " " << y << endl;
}