from __future__ import annotations

def 	__lowerCamelCase							(				__a    : int		)      ->       list[int]:
	_lowercase   =[0] * max_one

	for i in range(0      ,							__a		):
		_lowercase   =i

	for i in range(2      ,							__a		):
		if totients[i] == i:
			for j in range(__a      ,							__a      ,							__a		):
				totients[j] -= totients[j] // i

	return totients

def 	__lowerCamelCase							(				__a    : int      ,							__a    : int		)      ->       bool:
	return sorted(str(__a		)		) == sorted(str(__a		)		)

def 	__lowerCamelCase							(				__a    : int = 10_000_000		)      ->       int:
	_lowercase   =1  # i
	_lowercase   =0  # φ(i)
	_lowercase   =get_totients(max_n + 1		)

	for i in range(2      ,							max_n + 1		):
		_lowercase   =totients[i]

		if i * min_denominator < min_numerator * t and has_same_digits(__a      ,							__a		):
			_lowercase   =i
			_lowercase   =t

	return min_numerator


if __name__ == "__main__":
						print(F'''{solution() = }''')






"""simple docstring"""
def      lowerCamelCase_     (						lowerCamelCase_						,					lowerCamelCase_ = 2			)  ->      float:


					'''simple docstring'''
					return round((float(lowerCamelCase_			) * 9 / 5) + 32						,					lowerCamelCase_			)


def      lowerCamelCase_     (						lowerCamelCase_						,					lowerCamelCase_ = 2			)  ->      float:


					'''simple docstring'''
					return round(float(lowerCamelCase_			) + 273.15						,					lowerCamelCase_			)


def      lowerCamelCase_     (						lowerCamelCase_						,					lowerCamelCase_ = 2			)  ->      float:


					'''simple docstring'''
					return round((float(lowerCamelCase_			) * 9 / 5) + 491.67						,					lowerCamelCase_			)


def      lowerCamelCase_     (						lowerCamelCase_						,					lowerCamelCase_ = 2			)  ->      float:


					'''simple docstring'''
					return round((float(lowerCamelCase_			) - 32) * 5 / 9						,					lowerCamelCase_			)


def      lowerCamelCase_     (						lowerCamelCase_						,					lowerCamelCase_ = 2			)  ->      float:


					'''simple docstring'''
					return round(((float(lowerCamelCase_			) - 32) * 5 / 9) + 273.15						,					lowerCamelCase_			)


def      lowerCamelCase_     (						lowerCamelCase_						,					lowerCamelCase_ = 2			)  ->      float:


					'''simple docstring'''
					return round(float(lowerCamelCase_			) + 459.67						,					lowerCamelCase_			)


def      lowerCamelCase_     (						lowerCamelCase_						,					lowerCamelCase_ = 2			)  ->      float:


					'''simple docstring'''
					return round(float(lowerCamelCase_			) - 273.15						,					lowerCamelCase_			)


def      lowerCamelCase_     (						lowerCamelCase_						,					lowerCamelCase_ = 2			)  ->      float:


					'''simple docstring'''
					return round(((float(lowerCamelCase_			) - 273.15) * 9 / 5) + 32						,					lowerCamelCase_			)


def      lowerCamelCase_     (						lowerCamelCase_						,					lowerCamelCase_ = 2			)  ->      float:


					'''simple docstring'''
					return round((float(lowerCamelCase_			) * 9 / 5)						,					lowerCamelCase_			)


def      lowerCamelCase_     (						lowerCamelCase_						,					lowerCamelCase_ = 2			)  ->      float:


					'''simple docstring'''
					return round((float(lowerCamelCase_			) - 491.67) * 5 / 9						,					lowerCamelCase_			)


def      lowerCamelCase_     (						lowerCamelCase_						,					lowerCamelCase_ = 2			)  ->      float:


					'''simple docstring'''
					return round(float(lowerCamelCase_			) - 459.67						,					lowerCamelCase_			)


def      lowerCamelCase_     (						lowerCamelCase_						,					lowerCamelCase_ = 2			)  ->      float:


					'''simple docstring'''
					return round((float(lowerCamelCase_			) * 5 / 9)						,					lowerCamelCase_			)


def      lowerCamelCase_     (						lowerCamelCase_						,					lowerCamelCase_ = 2			)  ->      float:


					'''simple docstring'''
					return round((float(lowerCamelCase_			) * 1.25 + 273.15)						,					lowerCamelCase_			)


def      lowerCamelCase_     (						lowerCamelCase_						,					lowerCamelCase_ = 2			)  ->      float:


					'''simple docstring'''
					return round((float(lowerCamelCase_			) * 2.25 + 32)						,					lowerCamelCase_			)


def      lowerCamelCase_     (						lowerCamelCase_						,					lowerCamelCase_ = 2			)  ->      float:


					'''simple docstring'''
					return round((float(lowerCamelCase_			) * 1.25)						,					lowerCamelCase_			)


def      lowerCamelCase_     (						lowerCamelCase_						,					lowerCamelCase_ = 2			)  ->      float:


					'''simple docstring'''
					return round((float(lowerCamelCase_			) * 2.25 + 32 + 459.67)						,					lowerCamelCase_			)


if __name__ == "__main__":
			import doctest

			doctest.testmod()
