



def A    (							__UpperCamelCase			,						__UpperCamelCase			,						__UpperCamelCase       )    ->   Optional[Any]:
			if n == 0:
						return 1

			elif n % 2 == 1:
						return (binary_exponentiation(__UpperCamelCase			,						n - 1			,						__UpperCamelCase       ) * a) % mod

			else:
						A__	  =     binary_exponentiation(__UpperCamelCase			,						n / 2			,						__UpperCamelCase       )
						return (b * b) % mod


# a prime number
SCREAMING_SNAKE_CASE__   			=   7_0_1

SCREAMING_SNAKE_CASE__   			=   1_0_0_0_0_0_0_0_0_0
SCREAMING_SNAKE_CASE__   			=   1_0

# using binary exponentiation function, O(log(p)):
print((a / b) % p == (a * binary_exponentiation(b, p - 2, p)) % p)






print((a / b) % p == (a * b ** (p - 2)) % p)









'''simple docstring'''
from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


snake_case_					:      List[Any]    			=    {'configuration_van': ['VAN_PRETRAINED_CONFIG_ARCHIVE_MAP', 'VanConfig']}


try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					snake_case_					:      str    			=    [
					    'VAN_PRETRAINED_MODEL_ARCHIVE_LIST',
					    'VanForImageClassification',
					    'VanModel',
					    'VanPreTrainedModel',
					]

if TYPE_CHECKING:
					from .configuration_van import VAN_PRETRAINED_CONFIG_ARCHIVE_MAP, VanConfig

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_van import (
										    VAN_PRETRAINED_MODEL_ARCHIVE_LIST,
										    VanForImageClassification,
										    VanModel,
										    VanPreTrainedModel,
										)

else:
					import sys

					snake_case_					:      List[Any]    			=    _LazyModule(__name__, globals()['__file__'], _import_structure)


