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 double eps = 1e-9;
const int INF = 1000000007;
const int MOD = 1000000007;
const int MAXN = 100055;
int dx[] = {2, 1, -1, -2, -1, 1, 2, 1, -1};
int dy[] = {0, 2, 2, 0, -2, -2, 0, 2, 2};
int main() {
  long long n;
  while (cin >> n) {
    n++;
    if (n == 1) {
      cout << "0 0" << endl;
      continue;
    }
    long long L = (n - 1 + 2) / 3;
    L = sqrt(L + 0.5);
    while (3 * L * (L + 1) + 1 < n) ++L;
    n -= 3 * L * (L - 1) + 1;
    int side = (n - 1) / L;
    n -= L * side;
    long long ansx = dx[side] * L + dx[side + 2] * n;
    long long ansy = dy[side] * L + dy[side + 2] * n;
    cout << ansx << " " << ansy << endl;
  }
  return 0;
}