we need four loops to find all the submatrix of a matrix
for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 1 ; j <= n ; j ++ ) { for ( int i1 = i ; i1 <= n ; i1 ++ ) { for ( int j1 = j ; j1 <= n ; j1 ++ ) {