How many years did the history and culture of the Sui and Tang Dynasties last, and what impact did it have on China later?