A square piece of paper is folded in half as shown and then cut into two rectangles along the fold. The perimeter of each of the two rectangles is 18 inches. What is the perimeter of the original square?