"""simple docstring"""






class     UpperCAmelCase						:



    """simple docstring"""

    def __init__(   self    ,			_UpperCAmelCase    ,			_UpperCAmelCase							):
       lowercase__:   Union[str, Any]					=      name
       lowercase__:   Optional[Any]					=      val






    def __str__(   self							):
       return F"""{self.__class__.__name__}({self.name}, {self.val})"""






    def __lt__(   self    ,			_UpperCAmelCase							):
       return self.val < other.val



class     UpperCAmelCase						:



    """simple docstring"""

    def __init__(   self    ,			_UpperCAmelCase							):
       lowercase__:   Dict					=      {}
       lowercase__:   List[str]					=      {}
       lowercase__:   Any					=      self.build_heap(_UpperCAmelCase							)






    def __getitem__(   self    ,			_UpperCAmelCase							):
       return self.get_value(_UpperCAmelCase							)






    def _snake_case			(   self    ,			_UpperCAmelCase							):
       return (idx - 1) // 2






    def _snake_case			(   self    ,			_UpperCAmelCase							):
       return idx * 2 + 1






    def _snake_case			(   self    ,			_UpperCAmelCase							):
       return idx * 2 + 2






    def _snake_case			(   self    ,			_UpperCAmelCase							):
       return self.heap_dict[key]






    def _snake_case			(   self    ,			_UpperCAmelCase							):
       lowercase__:   Union[str, Any]					=      len(_UpperCAmelCase							) - 1
       lowercase__:   List[Any]					=      self.get_parent_idx(_UpperCAmelCase							)

       for idx, i in enumerate(_UpperCAmelCase							):
          lowercase__:   List[Any]					=      idx
          lowercase__:   int					=      i.val

       for i in range(_UpperCAmelCase    ,			-1    ,			-1							):
          self.sift_down(_UpperCAmelCase    ,			_UpperCAmelCase							)
       return array






    def _snake_case			(   self    ,			_UpperCAmelCase    ,			_UpperCAmelCase							):
       while True:
          lowercase__:   Tuple					=      self.get_left_child_idx(_UpperCAmelCase							)  # noqa: E741
          lowercase__:   Optional[Any]					=      self.get_right_child_idx(_UpperCAmelCase							)

          lowercase__:   List[Any]					=      idx
          if l < len(_UpperCAmelCase							) and array[l] < array[idx]:
             lowercase__:   Optional[int]					=      l
          if r < len(_UpperCAmelCase							) and array[r] < array[smallest]:
             lowercase__:   Optional[Any]					=      r

          if smallest != idx:
             lowercase__, lowercase__:   List[Any]					=      array[smallest], array[idx]
             (
                 (
                 lowercase__
             ), (
                 lowercase__
             ), 
             ):   Tuple					=      (
                 self.idx_of_element[array[smallest]],
                 self.idx_of_element[array[idx]],
             )
             lowercase__:   Tuple					=      smallest
          else:
             break






    def _snake_case			(   self    ,			_UpperCAmelCase							):
       lowercase__:   Tuple					=      self.get_parent_idx(_UpperCAmelCase							)
       while p >= 0 and self.heap[p] > self.heap[idx]:
          lowercase__, lowercase__:   Optional[Any]					=      self.heap[idx], self.heap[p]
          lowercase__, lowercase__:   Optional[int]					=      (
              self.idx_of_element[self.heap[idx]],
              self.idx_of_element[self.heap[p]],
          )
          lowercase__:   Tuple					=      p
          lowercase__:   Any					=      self.get_parent_idx(_UpperCAmelCase							)






    def _snake_case			(   self							):
       return self.heap[0]






    def _snake_case			(   self							):
       lowercase__, lowercase__:   str					=      self.heap[-1], self.heap[0]
       lowercase__, lowercase__:   Optional[int]					=      (
           self.idx_of_element[self.heap[-1]],
           self.idx_of_element[self.heap[0]],
       )

       lowercase__:   int					=      self.heap.pop()
       del self.idx_of_element[x]
       self.sift_down(0    ,			self.heap							)
       return x






    def _snake_case			(   self    ,			_UpperCAmelCase							):
       self.heap.append(_UpperCAmelCase							)
       lowercase__:   Tuple					=      len(self.heap							) - 1
       lowercase__:   Any					=      node.val
       self.sift_up(len(self.heap							) - 1							)






    def _snake_case			(   self							):
       return len(self.heap							) == 0






    def _snake_case			(   self    ,			_UpperCAmelCase    ,			_UpperCAmelCase							):
       assert (
           self.heap[self.idx_of_element[node]].val > new_value
       ), "newValue must be less that current value"
       lowercase__:   Optional[int]					=      new_value
       lowercase__:   str					=      new_value
       self.sift_up(self.idx_of_element[node]							)



__A			   = Node("R", -1)
__A			   = Node("B", 6)
__A			   = Node("A", 3)
__A			   = Node("X", 1)
__A			   = Node("E", 4)

# Use one of these two ways to generate Min-Heap

# Generating Min-Heap from array
__A			   = MinHeap([r, b, a, x, e])

# Generating Min-Heap by Insert method
# myMinHeap.insert(a)
# myMinHeap.insert(b)
# myMinHeap.insert(x)
# myMinHeap.insert(r)
# myMinHeap.insert(e)

# Before
print("Min Heap - before decrease key")
for i in my_min_heap.heap:
       print(i)

print("Min Heap - After decrease key of node [B -> -17]")
my_min_heap.decrease_key(b, -1_7)

# After
for i in my_min_heap.heap:
       print(i)

if __name__ == "__main__":
       import doctest

       doctest.testmod()

"""simple docstring"""






from __future__ import annotations

from fractions import Fraction



def SCREAMING_SNAKE_CASE__			(   __UpperCAmelCase       ,    __UpperCAmelCase )  ->  bool:
   return (
       num != den and num % 1_0 == den // 1_0 and (num // 1_0) / (den % 1_0) == num / den
   )



def SCREAMING_SNAKE_CASE__			(   __UpperCAmelCase )  ->  list[str]:
   lowercase__:   str					=      []
   lowercase__:   str					=      1_1
   lowercase__:   str					=      int('''1''' + '''0''' * digit_len )
   for num in range(__UpperCAmelCase       ,    __UpperCAmelCase ):
      while den <= 9_9:
         if (num != den) and (num % 1_0 == den // 1_0) and (den % 1_0 != 0):
            if is_digit_cancelling(__UpperCAmelCase       ,    __UpperCAmelCase ):
               solutions.append(F"""{num}/{den}""" )
         den += 1
      num += 1
      lowercase__:   Dict					=      1_0
   return solutions



def SCREAMING_SNAKE_CASE__			(   __UpperCAmelCase = 2 )  ->  int:
   lowercase__:   List[str]					=      1.0
   for fraction in fraction_list(__UpperCAmelCase ):
      lowercase__:   List[str]					=      Fraction(__UpperCAmelCase )
      result *= frac.denominator / frac.numerator
   return int(__UpperCAmelCase )


if __name__ == "__main__":
       print(solution())
