At the output where the combined amounts of consumer and producer surplus are largest: the maximum willingness to pay for the last unit of output equals the minimum acceptable price of that unit of output