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;
inline long long Readint() {
  long long ret = 0;
  int f = 1;
  char ch;
  do {
    ch = getchar();
    if (ch == '-') f *= -1;
  } while (ch >= 0 && (ch < '0' || ch > '9'));
  while ('0' <= ch && ch <= '9') {
    ret = ret * 10 + ch - '0';
    ch = getchar();
  }
  return ret * f;
}
void open() {
  freopen("E.in", "r", stdin);
  freopen("E.out", "w", stdout);
}
void close() {
  fclose(stdin);
  fclose(stdout);
}
long long n;
long long k;
const int x[] = {1, -1, -2, -1, 1, 2};
const int y[] = {2, 2, 0, -2, -2, 0};
void init() { n = Readint(); }
void work() {
  k = (long long)sqrt(n / 3);
  if (3 * k * (k + 1) > n) k--;
  long long nowx = 2 * k, nowy = 0;
  n -= 3 * k * (k + 1);
  for (int i = 0, _END_ = 5; i <= _END_; i++) {
    if (!n) break;
    long long lim = (i == 0) ? (1) : (k + (i > 1));
    if (n > lim) {
      nowx += x[i] * lim;
      nowy += y[i] * lim;
      n -= lim;
    } else {
      nowx += x[i] * n;
      nowy += y[i] * n;
      n = 0;
    }
  }
  if (n) nowx += x[0] * n, nowy += y[0] * n;
  printf("%I64d %I64d\n", nowx, nowy);
}
int main() {
  int _ = 0;
  init();
  if (n)
    work();
  else
    printf("0 0");
  close();
  return 0;
}