




"""simple docstring"""


import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
     import ctypes
     import msvcrt  # noqa






     class  lowercase(					ctypes.Structure			):







      '''simple docstring'''





      lowercase__			 = [("size", ctypes.c_int), ("visible", ctypes.c_byte)]


def  UpperCAmelCase__	():
  """simple docstring"""

  if os.name == "nt":
    _snake_case							:		Any								=  CursorInfo()
    _snake_case							:		Optional[int]								=  ctypes.windll.kernelaa.GetStdHandle(-11   )
    ctypes.windll.kernelaa.GetConsoleCursorInfo(snake_case__		,       ctypes.byref(snake_case__   )   )
    _snake_case							:		List[Any]								=  False
    ctypes.windll.kernelaa.SetConsoleCursorInfo(snake_case__		,       ctypes.byref(snake_case__   )   )
  elif os.name == "posix":
    sys.stdout.write("""\033[?25l"""   )
    sys.stdout.flush()


def  UpperCAmelCase__	():
  """simple docstring"""

  if os.name == "nt":
    _snake_case							:		str								=  CursorInfo()
    _snake_case							:		int								=  ctypes.windll.kernelaa.GetStdHandle(-11   )
    ctypes.windll.kernelaa.GetConsoleCursorInfo(snake_case__		,       ctypes.byref(snake_case__   )   )
    _snake_case							:		List[Any]								=  True
    ctypes.windll.kernelaa.SetConsoleCursorInfo(snake_case__		,       ctypes.byref(snake_case__   )   )
  elif os.name == "posix":
    sys.stdout.write("""\033[?25h"""   )
    sys.stdout.flush()






@contextmanager
def  UpperCAmelCase__	():
  """simple docstring"""

  try:
    hide_cursor()
    yield
  finally:
    show_cursor()








"""simple docstring"""


def  UpperCAmelCase__	(snake_case__							: int   ):
  """simple docstring"""

  _snake_case							:		Optional[Any]								=  (1 + 24 * n) ** 0.5
  return ((1 + root) / 6) % 1 == 0


def  UpperCAmelCase__	(snake_case__							: int = 50_00   ):
  """simple docstring"""

  _snake_case							:		List[str]								=  [(i * (3 * i - 1)) // 2 for i in range(1		,       snake_case__   )]
  for i, pentagonal_i in enumerate(snake_case__   ):
    for j in range(snake_case__		,       len(snake_case__   )   ):
      _snake_case							:		Dict								=  pentagonal_nums[j]
      _snake_case							:		Optional[Any]								=  pentagonal_i + pentagonal_j
      _snake_case							:		List[str]								=  pentagonal_j - pentagonal_i
      if is_pentagonal(snake_case__   ) and is_pentagonal(snake_case__   ):
        return b

  return -1


if __name__ == "__main__":
     print(F'''{solution() = }''')


