Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimization