Economies of scope in intermediate goods and a system of cities