Perimeter and dimensions of rectangles