Pion production in pp and ee annihilations