Chang'an was the capital of Sui and Tang — Daxing under Sui, Chang'an under Tang — at present Xi'an, Shaanxi. In 582 Emperor Wen of Sui had Yuwen Kai build Daxing, completed under the Tang: the outer walls nine thousand seven hundred meters east-west and eight thousand six hundred north-south, over 84 square kilometers — 2.4 times Han Chang'an and seven times the contemporary Byzantine capital — with more than a million people, the largest city on earth. The layout was a chessboard: palace city and imperial city to the north, the outer city ranged on the Vermilion Bird Avenue, a hundred-odd walled wards like a go board, the East and West Markets the centers of world trade crowded with Silk Road merchants; the three great palaces — Daming, Taiji, Xingqing — vast in scale, the Hanyuan hall 'rising like the sun'. It was the supreme model of the ward-and-avenue capital: Japan's Heijo-kyo and Heian-kyo copied its plan. In 904 Zhu Wen forced the Tang court east and razed the palaces — the imperial city a ruin, never rebuilt through the Five Dynasties. Chang'an was the hub of Eurasian exchange — Persian, Arab, Sillan and Japanese envoys and students crowding its wards — and its layout remains the prototype image of the Chinese capital.