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 double const PI = 3.14159265358979323;
long long mod = 1000000007;
long long binpow(long long a, long long n) {
  if (n == 0) return 1;
  if (n % 2 == 1)
    return (binpow(a, n - 1) * a);
  else {
    long long b = binpow(a, n / 2);
    return (b * b);
  }
}
vector<long long> zf(string s) {
  long long n = (long long)s.length();
  vector<long long> z(n);
  for (long long i = 1, l = 0, r = 0; i < n; ++i) {
    if (i <= r) z[i] = min(r - i + 1, z[i - l]);
    while (i + z[i] < n && s[z[i]] == s[i + z[i]]) ++z[i];
    if (i + z[i] - 1 > r) l = i, r = i + z[i] - 1;
  }
  return z;
}
int main() {
  ios_base::sync_with_stdio(0);
  long long n;
  cin >> n;
  long long l = 0;
  long long r = 1e9;
  long long m;
  for (long long j = 0; j < (100); j++) {
    m = (r + l) / 2;
    if (3 * m * (m + 1) > n) {
      r = m;
    } else {
      l = m;
    }
  }
  n -= 3 * m * (m + 1);
  long long a, b;
  a = 2 * m;
  b = 0;
  m += 1;
  if (n == 0) {
    cout << a << " " << b;
    return 0;
  } else {
    if (n == 1) {
      a += 1;
      b += 2;
      cout << a << " " << b;
      return 0;
    }
    a += 1;
    b += 2;
    n -= 1;
    if (n <= m - 1) {
      a -= n;
      b += 2 * n;
      cout << a << " " << b;
      return 0;
    }
    a -= m - 1;
    b += 2 * (m - 1);
    n -= m - 1;
    if (n <= m) {
      a -= 2 * n;
      cout << a << " " << b;
      return 0;
    }
    a -= 2 * m;
    n -= m;
    if (n <= m) {
      a -= n;
      b -= 2 * n;
      cout << a << " " << b;
      return 0;
    }
    a -= m;
    b -= 2 * m;
    n -= m;
    if (n <= m) {
      a += n;
      b -= 2 * n;
      cout << a << " " << b;
      return 0;
    }
    a += m;
    b -= 2 * m;
    n -= m;
    if (n <= m) {
      a += 2 * n;
      cout << a << " " << b;
      return 0;
    }
    a += 2 * m;
    n -= m;
    a += n;
    b += 2 * n;
    cout << a << " " << b;
  }
  return 0;
}