What does the tang dynasty and the yuan dynasty have in common?