added largest sub square and rectangle matrix