A study of the forward production of charm particle pairs in p-Fe and π−-Fe interactions