A rectangle has a perimeter of 52 cm and an area of 144 square cm. Find its length and width if they are in whole numbers.