Determination of the dynamic characteristics of the building and its base from the accelerograms of weak earthquakes