Ancient mathematics in Egypt and Babylon