


'''simple docstring'''



def      _a     (						_lowercase :     str  ):





     '''simple docstring'''






     __UpperCAmelCase     :			Any  							=      hex_num.strip()
     if not hex_num:
          raise ValueError('''No value was passed to the function'''  )

     __UpperCAmelCase     :			str  							=      hex_num[0] == '''-'''
     if is_negative:
          __UpperCAmelCase     :			List[str]  							=      hex_num[1:]

     try:
          __UpperCAmelCase     :			Optional[int]  							=      int(_lowercase      , 16  )
     except ValueError:
          raise ValueError('''Invalid value was passed to the function'''  )

     __UpperCAmelCase     :			Union[str, Any]  							=      ''''''
     while int_num > 0:
          __UpperCAmelCase     :			List[Any]  							=      str(int_num % 2  ) + bin_str
          int_num >>= 1

     return int(('''-''' + bin_str) if is_negative else bin_str  )


if __name__ == "__main__":
    import doctest

    doctest.testmod()



'''simple docstring'''



def      _a     (						_lowercase :     int = 600851475143  ):





     '''simple docstring'''






     try:
          __UpperCAmelCase     :			str  							=      int(_lowercase  )
     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     :			Dict  							=      1
     __UpperCAmelCase     :			List[str]  							=      2
     while i * i <= n:
          while n % i == 0:
               __UpperCAmelCase     :			int  							=      i
               n //= i
          i += 1
     if n > 1:
          __UpperCAmelCase     :			List[str]  							=      n
     return int(_lowercase  )


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