The nuclear-magnetic-resonance (NMR) spectra of **8**9Y and **5**7Fe in the compounds YFe//2 and Gd//0//. //2Y//0//. //8Fe//2 under omnidirectional compression are obtained. Analysis of the experimental results allows the dependence of the parameters of indirect exchange interaction on the volume to be estimated.