



def    _snake_case (       __snake_case					,  __snake_case    )     ->     int:






      '''simple docstring'''







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







def    _snake_case (       __snake_case					,  __snake_case    )     ->     int:






      '''simple docstring'''







      while y:  # --> when y=0 then loop will terminate and return x as final GCD.
            UpperCAmelCase_      ,      UpperCAmelCase_  :	Optional[Any]				      =		y, x % y
      return abs(__snake_case    )







def    _snake_case (       )     ->     Optional[Any]:






      '''simple docstring'''







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


if __name__ == "__main__":
   main()





def    _snake_case (       __snake_case					,  __snake_case    )     ->     str:






      '''simple docstring'''







      if a < 0 or b < 0:
            raise ValueError("the value of both inputs must be positive"    )

      UpperCAmelCase_  :	List[Any]				      =		str(bin(__snake_case    )    )[2:]  # remove the leading "0b"
      UpperCAmelCase_  :	int				      =		str(bin(__snake_case    )    )[2:]  # remove the leading "0b"

      UpperCAmelCase_  :	Optional[int]				      =		max(len(__snake_case    )					,  len(__snake_case    )    )

      return "0b" + "".join(
          str(int(char_a == "1" and char_b == "1"    )    )
          for char_a, char_b in zip(a_binary.zfill(__snake_case    )					,  b_binary.zfill(__snake_case    )    )    )


if __name__ == "__main__":
   import doctest

   doctest.testmod()
