





'''simple docstring'''

def  _a     (				lowerCAmelCase_						):





      """simple docstring"""



      if len(lowerCAmelCase_						) == 1:
            return a[0], a[0]
      else:
            # split A into half.
            _snake_case		:						Tuple         =  a[: len(lowerCAmelCase_						) // 2]
            _snake_case		:						List[Any]         =  a[len(lowerCAmelCase_						) // 2 :]

            # 2 sub problems, 1/2 of original size.
            _snake_case  ,				_snake_case		:						Tuple         =  max_difference(lowerCAmelCase_						)
            _snake_case  ,				_snake_case		:						Union[str, Any]         =  max_difference(lowerCAmelCase_						)

            # get min of first and max of second
            # linear time
            _snake_case		:						Dict         =  min(lowerCAmelCase_						)
            _snake_case		:						Optional[Any]         =  max(lowerCAmelCase_						)

            # 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()









'''simple docstring'''

def  _a     (				lowerCAmelCase_ = 4_000_000						):





      """simple docstring"""



      _snake_case		:						Optional[int]         =  1
      _snake_case		:						Tuple         =  2
      _snake_case		:						Optional[Any]         =  0
      while j <= n:
            if j % 2 == 0:
                  total += j
            _snake_case  ,				_snake_case		:						str         =  j, i + j

      return total


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


