Effect of Soil-Structure Interaction on the dynamic behaviour of masonry and RC buildings