Original: The first known written reference to Japan is in the brief information given in Twenty-Four Histories , a collection of Chinese historical texts , in the 1st century AD .
Simplified: At that time , Japan had friendly relations with Korea and China 's Tang Dynasty .