Einstein-Yang-Mills from pure Yang-Mills amplitudes