The relationship between earthquakes and volcanoes