A prison consists of a square courtyard of side bounded by a perimeter wall and a square building of side placed centrally within the courtyard. The sides of the building are parallel to the perimeter walls.
Guards can stand either at the middle of a perimeter wall or in a corner of the courtyard. If the guards wish to see as great a length of the perimeter wall as possible, determine which of these positions is preferable. You should consider separately the cases and .