



'''simple docstring'''






import math
from decimal import Decimal, getcontext




def        snake_case_   (	lowerCAmelCase_ = 4000000						)->						int:





       '''simple docstring'''


       try:
              _UpperCAmelCase    :		Optional[Any]     	=					int(lowerCAmelCase_						)
       except (TypeError, ValueError):
              raise TypeError("""Parameter n must be int or castable to int."""						)
       if n <= 0:
              raise ValueError("""Parameter n must be greater than or equal to one."""						)
       _UpperCAmelCase    :		Tuple     	=					100
       _UpperCAmelCase    :		Tuple     	=					(Decimal(5						) ** Decimal(0.5						) + 1) / Decimal(2						)

       _UpperCAmelCase    :		str     	=					(math.floor(math.log(n * (phi + 2)			,  lowerCAmelCase_						) - 1						) // 3) * 3 + 2
       _UpperCAmelCase    :		Any     	=					Decimal(round(phi ** Decimal(index + 1						)						)						) / (phi + 2)
       _UpperCAmelCase    :		Tuple     	=					num // 2
       return int(lowerCAmelCase_						)


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




"""simple docstring"""







def 						_lowercase				(  _SCREAMING_SNAKE_CASE				:				list[int]						)    ->     tuple[int, int]:







     '''simple docstring'''


     if len(_SCREAMING_SNAKE_CASE						) == 1:
          return a[0], a[0]
     else:
          # split A into half.
          __A					:					List[str]								=		a[: len(_SCREAMING_SNAKE_CASE						) // 2]
          __A					:					Optional[Any]								=		a[len(_SCREAMING_SNAKE_CASE						) // 2 :]

          # 2 sub problems, 1/2 of original size.
          __A						,		__A					:					int								=		max_difference(_SCREAMING_SNAKE_CASE						)
          __A						,		__A					:					str								=		max_difference(_SCREAMING_SNAKE_CASE						)

          # get min of first and max of second
          # linear time
          __A					:					str								=		min(_SCREAMING_SNAKE_CASE						)
          __A					:					Optional[int]								=		max(_SCREAMING_SNAKE_CASE						)

          # 3 cases, either (small1, big1),
          # (min_first, max_second), (small2, big2)
          # constant comparisons
          if biga - smalla > max_second - min_first and biga - smalla > biga - smalla:
               return smalla, biga
          elif biga - smalla > max_second - min_first:
               return smalla, biga
          else:
               return min_first, max_second


if __name__ == "__main__":
       import doctest

       doctest.testmod()



