A wire of length 4 m is cut in two parts and the first part is bent in the shape of a square, while the second part is bent in the shape of an equilateral triangle. For which lengths of these parts the total area enclosed by the square and the triangle is: a. minimized? b. maximized?