
'''simple docstring'''




def 		lowerCAmelCase_				(   snake_case__		,				snake_case__						):




    '''simple docstring'''



    return abs(_UpperCAmelCase						) if a == 0 else greatest_common_divisor(b % a		,				_UpperCAmelCase						)







def 		lowerCAmelCase_				(   snake_case__		,				snake_case__						):




    '''simple docstring'''



    while y:  # --> when y=0 then loop will terminate and return x as final GCD.
        A       :   Tuple					=						y, x % y
    return abs(_UpperCAmelCase						)







def 		lowerCAmelCase_				(   ):




    '''simple docstring'''



    try:
        A       :   List[str]					=						input('''Enter two integers separated by comma (,): '''						).split(''','''						)
        A       :   List[str]					=						int(nums[0]						)
        A       :   List[Any]					=						int(nums[1]						)
        print(
            F'greatest_common_divisor({num_a}, {num_a}) = '
            F'{greatest_common_divisor(_UpperCAmelCase		,				_UpperCAmelCase						)}'						)
        print(F'By iterative gcd({num_a}, {num_a}) = {gcd_by_iterative(_UpperCAmelCase		,				_UpperCAmelCase						)}'						)
    except (IndexError, UnboundLocalError, ValueError):
        print('''Wrong input'''						)


if __name__ == "__main__":
      main()











"""simple docstring"""




def 						UpperCAmelCase__		(     _UpperCAmelCase					):






  """simple docstring"""





  A_  :       List[str]										=  hex_num.strip()
  if not hex_num:
    raise ValueError('No value was passed to the function'					)

  A_  :       Any										=  hex_num[0] == '-'
  if is_negative:
    A_  :       Optional[Any]										=  hex_num[1:]

  try:
    A_  :       Tuple										=  int(_UpperCAmelCase ,					16					)
  except ValueError:
    raise ValueError('Invalid value was passed to the function'					)

  A_  :       Union[str, Any]										=  ''
  while int_num > 0:
    A_  :       Optional[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()