The Nb-93 and Sc-45 nuclear-magnetic-resonance (NMR) spectra of disordered relaxor ferroelectrics PbSc1/2Nb1/2O3 (PSN) and PbMg1/3Nb2/3O3 (PMN) have been studied at T>T-m, where T(m)approximate to355 K and 265 K is the temperature of the dielectric susceptibility maximum for PSN and PMN, respectively. The analysis of the spectra was performed both on the basis of an analytical description of the NMR line shapes, allowing for homogeneous and inhomogeneous broadening related to a random distribution of the electric-field gradients, and a numerical Monte Carlo approach taking into account electric-field gradients originating from the random distribution of Mg, Sc, and Nb ions (which may be shifted or not) over B-type cation sites. 1/2<->-1/2 NMR spectra of Nb-93 and Sc-45 in PSN contain a narrow (3-4 kHz) almost isotropic component and a broad strongly anisotropic component. These two components of the NMR spectra are related to the 1:1 Sc/Nb ordered and compositionally disordered regions of the crystal, respectively. It is shown that in the disordered regions, the Sc3+, Nb5+, and O2- ions are randomly shifted from their cubic lattice sites in one of the three possible directions: [100] [110], or [111]. In PMN, the NMR spectrum of Nb-93 contains practically only the broad component. The portion of the unbroadened spectrum that may correspond to ideal 1:2 Mg/Nb ordered regions accounts only for 2-3 % of the total integral intensity. No evidence was obtained for the existence of 1:1 Mg/Nb regions in PMN. The NMR data demonstrate that in PMN the cubic symmetry at T>T-m is locally broken due to ion shifts similar to that in disordered PSN. The values of the ionic shifts have been estimated in the point-charge point-dipole approximation for the electric-field gradients both in PSN and PMN.