A rectangle is three times as long as it is wide. The perimeter is 36 cm. What is the length of each side?