


'''simple docstring'''

from __future__ import annotations





def __snake_case (				UpperCAmelCase_						:						int		):
 lowerCamelCase_								=  [0] * max_one

 for i in range(0 ,    UpperCAmelCase_		):
  lowerCamelCase_								=  i

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

 return totients





def __snake_case (				UpperCAmelCase_						:						int ,    UpperCAmelCase_						:						int		):
 return sorted(str(UpperCAmelCase_		)		) == sorted(str(UpperCAmelCase_		)		)





def __snake_case (				UpperCAmelCase_						:						int = 10000000		):
 lowerCamelCase_								=  1  # i
 lowerCamelCase_								=  0  # φ(i)
 lowerCamelCase_								=  get_totients(max_n + 1		)

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

  if i * min_denominator < min_numerator * t and has_same_digits(UpperCAmelCase_ ,    UpperCAmelCase_		):
   lowerCamelCase_								=  i
   lowerCamelCase_								=  t

 return min_numerator


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







'''simple docstring'''

import unittest

import numpy as np

from transformers import is_tf_available
from transformers.testing_utils import require_tf


if is_tf_available():
     import tensorflow as tf

     from transformers.activations_tf import get_tf_activation





@require_tf
class 					snake_case   (   unittest.TestCase      ):





  """simple docstring"""




  def   snake_case		(   self					):







   """simple docstring"""
   lowerCamelCase_								=  tf.constant([-100, -1.0, -0.1, 0, 0.1, 1.0, 100.0]					)
   lowerCamelCase_								=  get_tf_activation("gelu"					)
   lowerCamelCase_								=  get_tf_activation("gelu_10"					)

   lowerCamelCase_								=  gelu(UpperCamelCase					)
   lowerCamelCase_								=  geluaa(UpperCamelCase					)

   lowerCamelCase_								=  tf.where(y_gelu_aa < 10.0      ,  1.0      ,  0.0					)

   self.assertEqual(tf.math.reduce_max(UpperCamelCase					).numpy().item()      ,  10.0					)
   self.assertTrue(np.allclose(y_gelu * clipped_mask      ,  y_gelu_aa * clipped_mask					)					)







  def   snake_case		(   self					):







   """simple docstring"""
   get_tf_activation("gelu"					)
   get_tf_activation("gelu_10"					)
   get_tf_activation("gelu_fast"					)
   get_tf_activation("gelu_new"					)
   get_tf_activation("glu"					)
   get_tf_activation("mish"					)
   get_tf_activation("quick_gelu"					)
   get_tf_activation("relu"					)
   get_tf_activation("sigmoid"					)
   get_tf_activation("silu"					)
   get_tf_activation("swish"					)
   get_tf_activation("tanh"					)
   with self.assertRaises(UpperCamelCase					):
    get_tf_activation("bogus"					)
   with self.assertRaises(UpperCamelCase					):
    get_tf_activation(UpperCamelCase					)



