A rope 25m long is cut into two pieces. One piece is bent into the shape of a square, and the other into the shape of a circle. How should the rope be cut to maximise the total area enclosed by the pieces? And how should it be cut in order to minimise the total area enclosed by the two pieces?