The length of a garden is 10 feet longer than three times the width. The perimeter of the garden is 240 feet. Find the length and the width of the garden.