



UpperCamelCase_	       =   [
    [0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0],
    [0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
    [0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0],
    [0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0],
]







def 				A			(		__UpperCAmelCase							,					__UpperCAmelCase							,					__UpperCAmelCase							,					__UpperCAmelCase	)       ->       bool:



						'''simple docstring'''






						return 0 <= row < rows and 0 <= col < cols







def 				A			(		__UpperCAmelCase							,					__UpperCAmelCase							,					__UpperCAmelCase							,					__UpperCAmelCase	)       ->       int:



						'''simple docstring'''






						UpperCAmelCase_     							=     len(__UpperCAmelCase	)
						UpperCAmelCase_     							=     len(mat[0]	)
						if is_safe(__UpperCAmelCase							,					__UpperCAmelCase							,					__UpperCAmelCase							,					__UpperCAmelCase	) and (row, col) not in seen and mat[row][col] == 1:
												seen.add((row, col)	)
												return (
												    1
												    + depth_first_search(row + 1							,					__UpperCAmelCase							,					__UpperCAmelCase							,					__UpperCAmelCase	)
												    + depth_first_search(row - 1							,					__UpperCAmelCase							,					__UpperCAmelCase							,					__UpperCAmelCase	)
												    + depth_first_search(__UpperCAmelCase							,					col + 1							,					__UpperCAmelCase							,					__UpperCAmelCase	)
												    + depth_first_search(__UpperCAmelCase							,					col - 1							,					__UpperCAmelCase							,					__UpperCAmelCase	)
												)
						else:
												return 0







def 				A			(		__UpperCAmelCase	)       ->       int:



						'''simple docstring'''






						UpperCAmelCase_     							=     set()

						UpperCAmelCase_     							=     0
						for row, line in enumerate(__UpperCAmelCase	):
												for col, item in enumerate(__UpperCAmelCase	):
																		if item == 1 and (row, col) not in seen:
																								# Maximizing the area
																								UpperCAmelCase_     							=     max(__UpperCAmelCase							,					depth_first_search(__UpperCAmelCase							,					__UpperCAmelCase							,					__UpperCAmelCase							,					__UpperCAmelCase	)	)
						return max_area


if __name__ == "__main__":
							import doctest

							print(find_max_area(matrix))  # Output -> 6
							doctest.testmod()







"""simple docstring"""


import itertools



def     _lowerCamelCase(__UpperCamelCase       )				-> List[str]:
	return (
	    int("""""".join(combination[0:2]       )       ) * int("""""".join(combination[2:5]       )       )
	    == int("""""".join(combination[5:9]       )       )
	) or (
	    int("""""".join(combination[0]       )       ) * int("""""".join(combination[1:5]       )       )
	    == int("""""".join(combination[5:9]       )       )
	)



def     _lowerCamelCase()				-> Dict:
	return sum(
	    {
	        int("""""".join(pandigital[5:9]       )       )
	        for pandigital in itertools.permutations("""123456789"""       )
	        if is_combination_valid(__UpperCamelCase       )
	    }       )


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



