Angular distributions of muon pairs produced by negative pions on deuterium and tungsten