Geographically, the distance separating Japan from mainland Asia is 144 kilometers from Korea and almost 770 kilometers from China, a distance sometimes referred to poetically as "a narrow strip of water." In prehistoric times, migrants flowed into Japan across that strip of water, particularly from northeastern Asia and the Korean Peninsula. Recurrent flows via Korea explain why Japanese and Korean languages are closely related, whereas neither is related linguistically to Chinese. By the seventh and eighth centuries, when Japan's own written records appear, Korea and China had long been culturally sophisticated, settled, and nonexpansionist. The two nations offered Japan rich materials for borrowing, without risk of invasion or interference—a marvelous advantage for island Japan.