The perimeter of a rectangle is 82 m. If the width were doubled and the length were increased by 18 m, the perimeter would be 150 m. What are the length and width of the rectangle?