
"""simple docstring"""




a		:					List[Any]    	=					[
    [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 						__magic_name__		(				UpperCamelCase    :		int       ,		UpperCamelCase    :		int       ,		UpperCamelCase    :		int       ,		UpperCamelCase    :		int    )    ->	bool:
    return 0 <= row < rows and 0 <= col < cols



def 						__magic_name__		(				UpperCamelCase    :		int       ,		UpperCamelCase    :		int       ,		UpperCamelCase    :		set       ,		UpperCamelCase    :		list[list[int]]    )    ->	int:
    a__    = len(UpperCamelCase    )
    a__    = 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 						__magic_name__		(				UpperCamelCase    :		list[list[int]]    )    ->	int:
    a__    = set()

    a__    = 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
                a__    = 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"""




from itertools import combinations, product



def 						__magic_name__		(				UpperCamelCase    :		int       ,		UpperCamelCase    :		int       ,		UpperCamelCase    :		int       ,		UpperCamelCase    :		int    )    ->	bool:
    if xa == ya == 0 or xa == ya == 0:
        return False
    a__    = xa * xa + ya * ya
    a__    = xa * xa + ya * ya
    a__    = (xa - xa) * (xa - xa) + (ya - ya) * (ya - ya)
    return (
        a_square + b_square == c_square
        or a_square + c_square == b_square
        or b_square + c_square == a_square
    )



def 						__magic_name__		(				UpperCamelCase    :		int = 50    )    ->	int:
    return sum(
        1
        for pta, pta in combinations(product(range(limit + 1    )       ,		repeat=2    )       ,		2    )
        if is_right(*UpperCamelCase       ,		*UpperCamelCase    )    )


if __name__ == "__main__":
    print(F'''{solution() = }''')


