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>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
const long long N = 1e5 + 5;
long long dx[] = {1, -1, -2, -1, 1, 2};
long long dy[] = {2, 2, 0, -2, -2, 0};
long long cnt[] = {1, 0, 1, 1, 1, 1};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long ans = 0, s = 0, e = 1e9;
  while (s <= e) {
    long long mid = (s + e) >> 1;
    if (3 * mid * mid + 2 * mid <= n)
      ans = max(ans, mid), s = mid + 1;
    else
      e = mid - 1;
  }
  long long x = ans, y = -2 * ans;
  for (long long i = 0; i < 6; i++) cnt[i] += ans;
  ans = 3 * ans * ans + 2 * ans;
  for (long long j = 0; ans < n; j = (j + 1) % 6) {
    long long mv = min(cnt[j], n - ans);
    ans += mv;
    x += dx[j] * mv;
    y += dy[j] * mv;
    cnt[j]++;
  }
  cout << x << " " << y;
}