The ratio of length to width of a rectangle is 5:2. If the perimeter of the rectangle is 42, what are the length and width of the rectangle?