A rectangle has an area of 24 square inches. The length is 5 inches greater than the width. What are the dimensions of the rectangle? And what is the perimeter?