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 PYTHON3):

Solution:
#!/usr/bin/python3

import math

def solve(n):
  if n == 0:
    return (0, 0)

  k = int(0.5 * (-1 + math.sqrt(1 + 4 * n / 3.0))) + 10
  while 3 * k * (k + 1) >= n:
    k -= 1
 
  n -= 3 * k * (k + 1) + 1
  x = 1 + 2 * k
  y = 2

  lim = [k] + [k + 1] * 5
  dx = [-1, -2, -1, 1, 2, 1]
  dy = [2, 0, -2, -2, 0, 2]

  i = 0
  while n > 0:
    t = min(n, lim[i])
    x += t * dx[i]
    y += t * dy[i]
    n -= t
    i += 1

  return (x, y)

x, y = solve(int(input()))
print(x, y)

# for i in range(21):
#   print(i, solve(i))