The length of a rectangle is 5 feet less than three times its width. The perimeter is 30 feet. What are the dimensions of the rectangle?