Please help!!! I should know how to do this but it's just not happening for me.

If you have 12 meters of wire that has to be cut into 2 pieces. 1 piece is to be bent into the shape of a circle and the other into the shape of a square. How should the wire be cut so as to: a) maximize the total area enclosed by the shapes. b) Minimize the total area enclosed by the shapes.

Thanks for your help.