Maximum square submatrix with all 1s