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 maxn = 1e5 + 10;
inline long long p(long long x) { return (long long)6 * x * (x + 1) / 2; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  if (!n) return cout << "0 0", 0;
  long long l = 1, r = 1000000000;
  while (r - l) {
    long long mid = (l + r) / 2;
    if (n <= p(mid))
      r = mid;
    else
      l = mid + 1;
  }
  long long m = r;
  long long v = 2 * m - 1, u = 2;
  long long x = n - p(l - 1), t = x % m;
  if (!t) t = m;
  x--;
  x /= m;
  if (x == 5) {
    v += t;
    u += 2 * t;
    t = m;
    x--;
  }
  if (x == 4) {
    v += 2 * t;
    t = m;
    x--;
  }
  if (x == 3) {
    v += t;
    u -= 2 * t;
    t = m;
    x--;
  }
  if (x == 2) {
    v -= t;
    u -= 2 * t;
    t = m;
    x--;
  }
  if (x == 1) {
    v -= 2 * t;
    t = m;
    x--;
  }
  if (!x) {
    v -= (t - 1);
    u += 2 * (t - 1);
  }
  cout << v << " " << u;
}