
"""simple docstring"""
def  lowercase     (_lowerCAmelCase ,    _lowerCAmelCase						):
						return (pointa[0] - pointa[0]) ** 2 + (pointa[1] - pointa[1]) ** 2

def  lowercase     (_lowerCAmelCase ,    _lowerCAmelCase=0						):
						return sorted(_lowerCAmelCase ,    key=lambda _lowerCAmelCase						: x[column]						)

def  lowercase     (_lowerCAmelCase ,    _lowerCAmelCase ,    _lowerCAmelCase=float("""inf"""						)						):

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

def  lowercase     (_lowerCAmelCase ,    _lowerCAmelCase ,    _lowerCAmelCase=float("""inf"""						)						):

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

def  lowercase     (_lowerCAmelCase ,    _lowerCAmelCase ,    _lowerCAmelCase						):

						# base case
						if points_counts <= 3:
												return dis_between_closest_pair(_lowerCAmelCase ,    _lowerCAmelCase						)

						# recursion
						__lowerCAmelCase     =  points_counts // 2
						__lowerCAmelCase     =  closest_pair_of_points_sqr(
						    _lowerCAmelCase ,    points_sorted_on_y[:mid] ,    _lowerCAmelCase						)
						__lowerCAmelCase     =  closest_pair_of_points_sqr(
						    _lowerCAmelCase ,    points_sorted_on_y[mid:] ,    points_counts - mid						)
						__lowerCAmelCase     =  min(_lowerCAmelCase ,    _lowerCAmelCase						)
						__lowerCAmelCase     =  []
						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     =  dis_between_closest_in_strip(
						    _lowerCAmelCase ,    len(_lowerCAmelCase						) ,    _lowerCAmelCase						)
						return min(_lowerCAmelCase ,    _lowerCAmelCase						)

def  lowercase     (_lowerCAmelCase ,    _lowerCAmelCase						):
						__lowerCAmelCase     =  column_based_sort(_lowerCAmelCase ,    column=0						)
						__lowerCAmelCase     =  column_based_sort(_lowerCAmelCase ,    column=1						)
						return (
						    closest_pair_of_points_sqr(
						        _lowerCAmelCase ,    _lowerCAmelCase ,    _lowerCAmelCase						)
						) ** 0.5


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


"""simple docstring"""
import os

def  lowercase     ():
						with open(os.path.dirname(_lowerCAmelCase						) + """/grid.txt"""						) as f:
												__lowerCAmelCase     =  []  # noqa: E741
												for _ in range(20						):
																		l.append([int(_lowerCAmelCase						) for x in f.readline().split()]						)

												__lowerCAmelCase     =  0

												# right
												for i in range(20						):
																		for j in range(17						):
																								__lowerCAmelCase     =  l[i][j] * l[i][j + 1] * l[i][j + 2] * l[i][j + 3]
																								if temp > maximum:
																														__lowerCAmelCase     =  temp

        # down
												for i in range(17						):
																		for j in range(20						):
																								__lowerCAmelCase     =  l[i][j] * l[i + 1][j] * l[i + 2][j] * l[i + 3][j]
																								if temp > maximum:
																														__lowerCAmelCase     =  temp

        # diagonal 1
												for i in range(17						):
																		for j in range(17						):
																								__lowerCAmelCase     =  l[i][j] * l[i + 1][j + 1] * l[i + 2][j + 2] * l[i + 3][j + 3]
																								if temp > maximum:
																														__lowerCAmelCase     =  temp

        # diagonal 2
												for i in range(17						):
																		for j in range(3 ,    20						):
																								__lowerCAmelCase     =  l[i][j] * l[i + 1][j - 1] * l[i + 2][j - 2] * l[i + 3][j - 3]
																								if temp > maximum:
																														__lowerCAmelCase     =  temp
												return maximum


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