

def    __UpperCAmelCase (	__a      :			Optional[Any]		,__a      :			int	)			->     str:

					"""simple docstring"""

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



def    __UpperCAmelCase (	__a      :			Any		,__a      :			Optional[Any]=0	)			->     int:

					"""simple docstring"""

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



def    __UpperCAmelCase (	__a      :			Any		,__a      :			Tuple		,__a      :			Tuple=float('''inf'''	)	)			->     str:

					"""simple docstring"""

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



def    __UpperCAmelCase (	__a      :			int		,__a      :			List[str]		,__a      :			List[str]=float('''inf'''	)	)			->     Union[str, Any]:

					"""simple docstring"""

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



def    __UpperCAmelCase (	__a      :			List[str]		,__a      :			Optional[int]		,__a      :			Union[str, Any]	)			->     Any:

					"""simple docstring"""

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

					# recursion
					_a	:    Tuple         =		points_counts // 2
					_a	:    List[str]         =		closest_pair_of_points_sqr(
					    __a		,points_sorted_on_y[:mid]		,__a	)
					_a	:    List[str]         =		closest_pair_of_points_sqr(
					    __a		,points_sorted_on_y[mid:]		,points_counts - mid	)
					_a	:    Any         =		min(__a		,__a	)
					_a	:    List[str]         =		[]
					for point in points_sorted_on_x:
										if abs(point[0] - points_sorted_on_x[mid][0]	) < closest_pair_dis:
															cross_strip.append(__a	)

					_a	:    Dict         =		dis_between_closest_in_strip(
					    __a		,len(__a	)		,__a	)
					return min(__a		,__a	)



def    __UpperCAmelCase (	__a      :			Any		,__a      :			int	)			->     int:

					"""simple docstring"""

					_a	:    List[Any]         =		column_based_sort(__a		,column=0	)
					_a	:    int         =		column_based_sort(__a		,column=1	)
					return (
					    closest_pair_of_points_sqr(
					        __a		,__a		,__a	)
					) ** 0.5


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






import requests

a__				=		'''YOUR API KEY'''



def    __UpperCAmelCase (	__a      :			str		,__a      :			str = giphy_api_key	)			->     list:

					"""simple docstring"""

					_a	:    Optional[Any]         =		'''+'''.join(query.split()	)
					_a	:    Union[str, Any]         =		F"""https://api.giphy.com/v1/gifs/search?q={formatted_query}&api_key={api_key}"""
					_a	:    List[Any]         =		requests.get(__a	).json()['''data''']
					return [gif["url"] for gif in gifs]


if __name__ == "__main__":
			print('''\n'''.join(get_gifs('''space ship''')))



