




"""simple docstring"""




def 			__UpperCAmelCase			(      __UpperCamelCase     ,							__UpperCamelCase     ):
			return abs(__UpperCamelCase     ) if a == 0 else greatest_common_divisor(b % a     ,							__UpperCamelCase     )







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







def 			__UpperCAmelCase			(      ):
			try:
						__lowercase       :   Dict        =    input('''Enter two integers separated by comma (,): '''     ).split(''','''     )
						__lowercase       :   Any        =    int(nums[0]     )
						__lowercase       :   Optional[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'''







class _lowercase	:




							def __init__(							self:				Tuple			,							UpperCamelCase__:				list[int]     ):
														lowerCamelCase__					:	Union[str, Any]         =       len(UpperCamelCase__     )
														lowerCamelCase__					:	Union[str, Any]         =       [0] * len_array

														if len_array > 0:
																					lowerCamelCase__					:	Union[str, Any]         =       array[0]

														for i in range(1			,							UpperCamelCase__     ):
																					lowerCamelCase__					:	Tuple         =       self.prefix_sum[i - 1] + array[i]




							def 		lowerCamelCase_				(							self:				Tuple			,							UpperCamelCase__:				int			,							UpperCamelCase__:				int     ):
														if start == 0:
																					return self.prefix_sum[end]

														return self.prefix_sum[end] - self.prefix_sum[start - 1]




							def 		lowerCamelCase_				(							self:				Optional[int]			,							UpperCamelCase__:				int     ):
														lowerCamelCase__					:	Dict         =       {0}
														for sum_item in self.prefix_sum:
																					if sum_item - target_sum in sums:
																												return True

																					sums.add(UpperCamelCase__     )

														return False


if __name__ == "__main__":
			import doctest

			doctest.testmod()

