ENDOR and transferred hyperfine interaction of impurity rare-earth ions with nearest diamagnetic ions in crystals