Valence instability of Ce and La impurities in YNi2