



def 				A				(					_lowerCamelCase				, _lowerCamelCase  ):





							'''simple docstring'''




							return (pointa[0] - pointa[0]) ** 2 + (pointa[1] - pointa[1]) ** 2






def 				A				(					_lowerCamelCase				, _lowerCamelCase=0  ):





							'''simple docstring'''




							return sorted(_lowerCamelCase				, key=lambda _lowerCamelCase  : x[column]  )






def 				A				(					_lowerCamelCase				, _lowerCamelCase				, _lowerCamelCase=float("inf"  )  ):





							'''simple docstring'''




							for i in range(points_counts - 1  ):
														for j in range(i + 1				, _lowerCamelCase  ):
																					_lowerCAmelCase     :							int    =    euclidean_distance_sqr(points[i]				, points[j]  )
																					if current_dis < min_dis:
																												_lowerCAmelCase     :							List[str]    =    current_dis
							return min_dis






def 				A				(					_lowerCamelCase				, _lowerCamelCase				, _lowerCamelCase=float("inf"  )  ):





							'''simple docstring'''




							for i in range(min(6				, points_counts - 1  )				, _lowerCamelCase  ):
														for j in range(max(0				, i - 6  )				, _lowerCamelCase  ):
																					_lowerCAmelCase     :							str    =    euclidean_distance_sqr(points[i]				, points[j]  )
																					if current_dis < min_dis:
																												_lowerCAmelCase     :							List[Any]    =    current_dis
							return min_dis






def 				A				(					_lowerCamelCase				, _lowerCamelCase				, _lowerCamelCase  ):





							'''simple docstring'''




							if points_counts <= 3:
														return dis_between_closest_pair(_lowerCamelCase				, _lowerCamelCase  )

							# recursion
							_lowerCAmelCase     :							Any    =    points_counts // 2
							_lowerCAmelCase     :							Dict    =    closest_pair_of_points_sqr(
							    _lowerCamelCase				, points_sorted_on_y[:mid]				, _lowerCamelCase  )
							_lowerCAmelCase     :							str    =    closest_pair_of_points_sqr(
							    _lowerCamelCase				, points_sorted_on_y[mid:]				, points_counts - mid  )
							_lowerCAmelCase     :							Union[str, Any]    =    min(_lowerCamelCase				, _lowerCamelCase  )
							_lowerCAmelCase     :							str    =    []
							for point in points_sorted_on_x:
														if abs(point[0] - points_sorted_on_x[mid][0]  ) < closest_pair_dis:
																					cross_strip.append(_lowerCamelCase  )

							_lowerCAmelCase     :							str    =    dis_between_closest_in_strip(
							    _lowerCamelCase				, len(_lowerCamelCase  )				, _lowerCamelCase  )
							return min(_lowerCamelCase				, _lowerCamelCase  )






def 				A				(					_lowerCamelCase				, _lowerCamelCase  ):





							'''simple docstring'''




							_lowerCAmelCase     :							Any    =    column_based_sort(_lowerCamelCase				, column=0  )
							_lowerCAmelCase     :							Optional[int]    =    column_based_sort(_lowerCamelCase				, column=1  )
							return (
							    closest_pair_of_points_sqr(
							        _lowerCamelCase				, _lowerCamelCase				, _lowerCamelCase  )
							) ** 0.5


if __name__ == "__main__":
						_snake_case		=  [(2, 3), (12, 30), (40, 50), (5, 1), (12, 10), (3, 4)]
						print("Distance:", closest_pair_of_points(points, len(points)))





def 				A				(					_lowerCamelCase				, _lowerCamelCase  ):





							'''simple docstring'''




							if density <= 0:
														raise ValueError("Impossible fluid density"  )
							if bulk_modulus <= 0:
														raise ValueError("Impossible bulk modulus"  )

							return (bulk_modulus / density) ** 0.5


if __name__ == "__main__":
						import doctest

						doctest.testmod()
