


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


SCREAMING_SNAKE_CASE							    =							{'configuration_vit_msn': ['VIT_MSN_PRETRAINED_CONFIG_ARCHIVE_MAP', 'ViTMSNConfig']}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  SCREAMING_SNAKE_CASE							    =							[
      'VIT_MSN_PRETRAINED_MODEL_ARCHIVE_LIST',
      'ViTMSNModel',
      'ViTMSNForImageClassification',
      'ViTMSNPreTrainedModel',
  ]

if TYPE_CHECKING:
  from .configuration_vit_msn import VIT_MSN_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTMSNConfig

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_vit_msn import (
        VIT_MSN_PRETRAINED_MODEL_ARCHIVE_LIST,
        ViTMSNForImageClassification,
        ViTMSNModel,
        ViTMSNPreTrainedModel,
    )

else:
  import sys

  SCREAMING_SNAKE_CASE							    =							_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)







"""simple docstring"""

def lowerCAmelCase_   (					UpperCamelCase__						:			Union[str, Any]					, UpperCamelCase__						:			Union[str, Any]					, UpperCamelCase__						:			int			):






 """simple docstring"""







 if n == 0:
  return 1

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

 else:
  __lowercase						=						binary_exponentiation(UpperCamelCase__					, n / 2					, UpperCamelCase__			)
  return (b * b) % mod


# a prime number
UpperCAmelCase__					=701

UpperCAmelCase__					=10_0000_0000
UpperCAmelCase__					=10

# 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)
