Distribution of earthquakes and volcanoes