How did the Mesopotamians and Egyptians impact modern society?