The length and width of a garden are in a ratio of 10:8. The perimeter of the garden is 324 feet. What is the length and width?