A rectangle has a length that is 5 units more than three times its width. If the perimeter of the rectangle is 58 units, what are the dimensions of the rectangle? Let's think step by step and output the final answer within \boxed{}.
user