'''simple docstring'''




import math

def      UpperCamelCase_							( _UpperCAmelCase  :				Dict   )   ->   Dict:


       """simple docstring"""







       _UpperCAmelCase					:  Dict											=   0
       if n % 2 == 0:
              count += 1
              while n % 2 == 0:
                     _UpperCAmelCase					:  Optional[Any]											=   int(n / 2   )
    # the n input value must be odd so that
    # we can skip one element (ie i += 2)

       _UpperCAmelCase					:  Dict											=   3

       while i <= int(math.sqrt(_UpperCAmelCase   )   ):
              if n % i == 0:
                     count += 1
                     while n % i == 0:
                            _UpperCAmelCase					:  Optional[int]											=   int(n / i   )
              _UpperCAmelCase					:  Tuple											=   i + 2

       # this condition checks the prime
       # number n is greater than 2

       if n > 2:
              count += 1
       return count


if __name__ == "__main__":
  __SCREAMING_SNAKE_CASE	:					List[str]					=  51_242_183
  print(F'The number of distinct prime factors is/are {exact_prime_factor_count(n)}')
  print(F'The value of log(log(n)) is {math.log(math.log(n)):.4f}')


'''simple docstring'''




def      UpperCamelCase_							( _UpperCAmelCase  :				int      ,     _UpperCAmelCase  :				list[tuple[int, int, int]]   )   ->   list[tuple[int, int, int]]:


       """simple docstring"""







       _UpperCAmelCase					:  Optional[int]											=   sorted(_UpperCAmelCase      ,     key=lambda _UpperCAmelCase   : edge[2]   )

       _UpperCAmelCase					:  Optional[int]											=   list(range(_UpperCAmelCase   )   )

       def find_parent(_UpperCAmelCase  :				Dict   ):
              if i != parent[i]:
                     _UpperCAmelCase					:  Tuple											=   find_parent(parent[i]   )
              return parent[i]

       _UpperCAmelCase					:  Union[str, Any]											=   0
       _UpperCAmelCase					:  Dict											=   []

       for edge in edges:
              _UpperCAmelCase					:  List[str]											=   find_parent(edge[0]   )
              _UpperCAmelCase					:  str											=   find_parent(edge[1]   )
              if parent_a != parent_b:
                     minimum_spanning_tree_cost += edge[2]
                     minimum_spanning_tree.append(_UpperCAmelCase   )
                     _UpperCAmelCase					:  Optional[Any]											=   parent_b

       return minimum_spanning_tree


if __name__ == "__main__":  # pragma: no cover
  __SCREAMING_SNAKE_CASE					, __SCREAMING_SNAKE_CASE	:					int					=  list(map(int, input().strip().split()))
  __SCREAMING_SNAKE_CASE	:					str					=  []

  for _ in range(num_edges):
    __SCREAMING_SNAKE_CASE					, __SCREAMING_SNAKE_CASE					, __SCREAMING_SNAKE_CASE	:					str					=  (int(x) for x in input().strip().split())
    edges.append((nodea, nodea, cost))

  kruskal(num_nodes, edges)

