The length and width of a rectangle are in the ratio 3:4. The perimeter of the rectangle is 84 cm. Find the length and width of the rectangle.