Shapes with a given area and perimeter