you give array rectangle rectanglesi li wi represent ith rectangle length li width wiYou cut ith rectangle form square length k k li k wi for example rectangle 46 cut square length 4let maxLen length large square obtain give rectanglesreturn number rectangle square length maxLen Example 1input rectangle 5839512165output 3explanation the large square rectangle length 5355the large possible square length 5 3 rectanglesExample 2input rectangle 23374337output 3 constraints1 rectangleslength 1000rectanglesilength 21 li wi 109li wi