

'''simple docstring'''
def  a__       (    _SCREAMING_SNAKE_CASE   :       int | float | str				)     ->					tuple[int, int]:


	"""simple docstring"""





	try:
		UpperCAmelCase_     :      int						=  float(_SCREAMING_SNAKE_CASE				)
	except ValueError:
		raise ValueError("Please enter a valid number"				)
	UpperCAmelCase_     :      List[str]						=  decimal - int(_SCREAMING_SNAKE_CASE				)
	if fractional_part == 0:
		return int(_SCREAMING_SNAKE_CASE				), 1
	else:
		UpperCAmelCase_     :      Any						=  len(str(_SCREAMING_SNAKE_CASE				).split("."				)[1]				)
		UpperCAmelCase_     :      Any						=  int(decimal * (10**number_of_frac_digits)				)
		UpperCAmelCase_     :      Any						=  10**number_of_frac_digits
		UpperCAmelCase_					,					UpperCAmelCase_     :      Optional[Any]						=  denominator, numerator
		while True:
			UpperCAmelCase_     :      List[str]						=  dividend % divisor
			if remainder == 0:
				break
			UpperCAmelCase_					,					UpperCAmelCase_     :      int						=  divisor, remainder
		UpperCAmelCase_					,					UpperCAmelCase_     :      Dict						=  numerator / divisor, denominator / divisor
		return int(_SCREAMING_SNAKE_CASE				), int(_SCREAMING_SNAKE_CASE				)


if __name__ == "__main__":
					print(f"""{decimal_to_fraction(2) = }""")
					print(f"""{decimal_to_fraction(89.0) = }""")
					print(f"""{decimal_to_fraction('67') = }""")
					print(f"""{decimal_to_fraction('45.0') = }""")
					print(f"""{decimal_to_fraction(1.5) = }""")
					print(f"""{decimal_to_fraction('6.25') = }""")
					print(f"""{decimal_to_fraction('78td') = }""")









from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_lowercase    	=		{
    "configuration_upernet": ["UperNetConfig"],
}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _lowercase    	=		[
       "UperNetForSemanticSegmentation",
       "UperNetPreTrainedModel",
   ]


if TYPE_CHECKING:
   from .configuration_upernet import UperNetConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_upernet import UperNetForSemanticSegmentation, UperNetPreTrainedModel


else:
   import sys

   _lowercase    	=		_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)
