Historically, these differences have led to differences in warfare during the pre-modern era, as cavalry could easily dominate the northern plains but encountered difficulties against river navies fielded in the south. There are also major differences in cuisine, culture, and popular entertainment forms such as opera. Episodes of division into North and South include:  During and after the Qing dynasty are few regional-based rebellions which include:  The Northern and Southern Dynasties showed such a high level of polarization between North and South that northerners and southerners referred to each other as barbarians; the Mongol Yuan dynasty also made use of the concept: Yuan subjects were divided into four castes, with northern Han Chinese occupying the third-caste and southern Han Chinese occupying the lowest one. For a large part of Chinese history, northern China was economically more advanced than southern China . The Jurchen and Mongol invasion caused a massive migration to southern China, and the Emperor shifted the Song dynasty capital city from Kaifeng in northern China to Hangzhou, located south of the Yangtze river. The population of Shanghai increased from 12,000 households to over 250,000 inhabitants after Kaifeng was sacked by invading armies. This began a shift of political, economic and cultural power from northern China to southern China. The east coast of southern China remained a leading economic and cultural center of China until the Republic of China. Today, southern China remains economically more prosperous than northern China. During the Qing dynasty, regional differences and identification in China fostered the growth of regional stereotypes. Such stereotypes often appeared in historic chronicles and gazetteers and were based on geographic circumstances, historical and literary associations (e.g. people from Shandong, were considered upright and honest) and Chinese cosmology (as the south was associated with the fire element, Southerners were considered hot-tempered). These differences were reflected in Qing dynasty policies, such as the prohibition on local officials to serve their home areas, as well as conduct of personal and commercial relations. In 1730, the Kangxi Emperor made the observation in the "Tingxun Geyan" (《庭訓格言》): During the Republican period, Lu Xun, a major Chinese writer, wrote: In modern times, North and South is merely one of the ways that Chinese people identify themselves, and the divide between northern and southern China has been complicated both by a unified Chinese nationalism and as well as by local loyalties to linguistically and culturally distinct regions within province, prefecture, county, town and village isolates which prevent a coherent Northern or Southern identity from forming.