"""simple docstring"""





def 				a_     (      _lowerCAmelCase  : int   , _lowerCAmelCase  : int     ):





       '''simple docstring'''

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





def 				a_     (      _lowerCAmelCase  : int   , _lowerCAmelCase  : int     ):





       '''simple docstring'''

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





def 				a_     (      ):





       '''simple docstring'''

       try:
              lowercase__			:		int       =	input('Enter two integers separated by comma (,): '     ).split(','     )
              lowercase__			:		Tuple       =	int(nums[0]     )
              lowercase__			:		str       =	int(nums[1]     )
              print(
                  f"""greatest_common_divisor({num_a}, {num_a}) = """
                  f"""{greatest_common_divisor(_lowerCAmelCase   , _lowerCAmelCase     )}"""     )
              print(f"""By iterative gcd({num_a}, {num_a}) = {gcd_by_iterative(_lowerCAmelCase   , _lowerCAmelCase     )}"""     )
       except (IndexError, UnboundLocalError, ValueError):
              print('Wrong input'     )


if __name__ == "__main__":
       main()






import json
import os
import tempfile

from transformers.testing_utils import check_json_file_has_correct_format

class 		UpperCAmelCase__			:




			'''simple docstring'''






			UpperCamelCase									=       None




			def  snake_case__     (   self							: List[str] ):
					'''simple docstring'''





					__UpperCAmelCase    :     List[Any]													=	self.feature_extraction_class(**self.feat_extract_dict )
					__UpperCAmelCase    :     Optional[int]													=	json.loads(feat_extract.to_json_string() )
					for key, value in self.feat_extract_dict.items():
							self.assertEqual(obj[key]       ,       a_ )




			def  snake_case__     (   self							: Any ):
					'''simple docstring'''





					__UpperCAmelCase    :     str													=	self.feature_extraction_class(**self.feat_extract_dict )

					with tempfile.TemporaryDirectory() as tmpdirname:
							__UpperCAmelCase    :     Union[str, Any]													=	os.path.join(a_       ,       '''feat_extract.json''' )
							feat_extract_first.to_json_file(a_ )
							__UpperCAmelCase    :     Any													=	self.feature_extraction_class.from_json_file(a_ )

					self.assertEqual(feat_extract_second.to_dict()       ,       feat_extract_first.to_dict() )




			def  snake_case__     (   self							: Optional[int] ):
					'''simple docstring'''





					__UpperCAmelCase    :     Tuple													=	self.feature_extraction_class(**self.feat_extract_dict )

					with tempfile.TemporaryDirectory() as tmpdirname:
							__UpperCAmelCase    :     List[str]													=	feat_extract_first.save_pretrained(a_ )[0]
							check_json_file_has_correct_format(a_ )
							__UpperCAmelCase    :     Optional[Any]													=	self.feature_extraction_class.from_pretrained(a_ )

					self.assertEqual(feat_extract_second.to_dict()       ,       feat_extract_first.to_dict() )




			def  snake_case__     (   self							: Dict ):
					'''simple docstring'''





					__UpperCAmelCase    :     int													=	self.feature_extraction_class()
					self.assertIsNotNone(a_ )





