
from __future__ import annotations







def 							UpperCAmelCase_(  a__					):



    """simple docstring"""



    SCREAMING_SNAKE_CASE							:							str								=      2
    SCREAMING_SNAKE_CASE							:							Optional[int]								=      []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(_A					)
    if n > 1:
        factors.append(_A					)
    return factors


if __name__ == "__main__":
      import doctest

      doctest.testmod()

'''simple docstring'''




def 				snake_case__							(			_A:					int      ,   _A:					int )    ->	int:

		'''simple docstring'''


		while a != 0:
				lowerCAmelCase					,     lowerCAmelCase   					=  b % a, a
		return b






def 				snake_case__							(			_A:					int      ,   _A:					int )    ->	int:

		'''simple docstring'''


		if gcd(_A      ,   _A ) != 1:
				lowerCAmelCase   					=  f"mod inverse of {a!r} and {m!r} does not exist"
				raise ValueError(_A )
		lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase   					=  1, 0, a
		lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase   					=  0, 1, m
		while va != 0:
				lowerCAmelCase   					=  ua // va
				lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase   					=  (ua - q * va), (ua - q * va), (ua - q * va), va, va, va
		return ua % m




