The Chinese had a surname before the Three Sovereigns and Five Emperors (about 5000 years ago). At that time, it was a matrilineal society. People only knew their mother but did not know their father. Therefore, "surname" is made up of "female" and "birth", which means that the earliest surnames were based on the mother's surname. During the Xia, Shang, and Zhou dynasties, people had both surnames and clans. "Surname" came from the village where they lived or the name of the tribe they belonged to. "Clan" came from the land granted by the sovereign, the title granted, the official position held, or the honorary title given after death according to their achievements. Therefore, the nobles had a surname, a given name, and a clan name; the commoners had a surname and a given name, but no clan name. Men and women of the same "clan" could marry, but men and women of the same "surname" could not marry. This is because the Chinese discovered early on the genetic rule: consanguineous marriage is detrimental to offspring.