What factors contributed to the prosperity of East African city-states during ancient times?