Lin's garden has an area of 782 square feet. The length of the garden is 5 less than three times its width. What are the dimensions of the garden?