If the length of the rectangle is reduced by 1cm and its width by 2cm, a square with an area of ​​20cm2 smaller than the area of ​​the rectangle is obtained. Find the perimeter of the rectangle.