A rectangle has twice the area of a square. The rectangle is 18in by 4in. What is the perimeter of the square?