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;
int n, m, tot;
long long mpow(long long x, long long y) {
  if (y == 0) return 1;
  long long res = mpow(x, y >> 1);
  res *= res;
  res %= 1000000007;
  if (y & 1) res *= x;
  return res % 1000000007;
}
typedef struct Ed {
  int l, r, nxt;
} E;
const double pi = 4 * atan(1);
const double eps = 1e-10;
double mabs(double x) {
  if (x < 0) return -x;
  return x;
}
char upc(char x) {
  if (x >= 'a' && x <= 'z')
    return x - 32;
  else
    return x;
}
int mcmp(const E& x, const E& y) { return x.nxt < y.nxt; }
int main(void) {
  int T;
  char op;
  long long K;
  {
    scanf("%I64d", &K);
    if (K == 0) {
      printf("0 0\n");
      return 0;
    }
    unsigned long long XX = (unsigned long long)K * 12 + 9;
    double X = sqrt(XX);
    unsigned long long tmp = (unsigned long long)X;
    if (tmp * tmp > XX) X -= 0.000001;
    X = 3 + X;
    X /= 6;
    long long D;
    if (XX % (long long)sqrt(XX) == 0)
      D = (long long)(X - eps);
    else
      D = (long long)X;
    long long M = K - D * (D - 1) * 3;
    K = M / D % 6;
    M %= D;
    long long x, y;
    if (K == 0) {
      x = D * 2 - M;
      y = M * 2;
    }
    if (K == 1) {
      x = D - M * 2;
      y = D * 2;
    }
    if (K == 2) {
      x = -D - M;
      y = (D - M) * 2;
    }
    if (K == 3) {
      x = -D * 2 + M;
      y = -M * 2;
    }
    if (K == 4) {
      x = M * 2 - D;
      y = -D * 2;
    }
    if (K == 5) {
      x = D + M;
      y = (M - D) * 2;
    }
    printf("%I64d %I64d\n", x, y);
  }
  return 0;
}