The effect of Ga substitution on the magnetic properties of Nd2Fe14B, Pr2Fe14B, and PrCo5