A square and a rectangle have the same perimeter. the length of the rectangle is 4 cm less than twice the side of the square, and the width of the rectangle is 6 cm less than the side of the square. Find the perimeter of each figure. ​