# Ali-ibn-Vali and Vali-ibn-Ali (aka multiplication vs sum) [duplicate]

The Sultan had two wise sages in his service, Ali-ibn-Vali and Vali-ibn-Ali. The Sultan wanted to test their intelligence and told them, "I have thought of two numbers, both are integers greater than 1 and less than 100. I've multiplied them and told the result to Ali. I've added them and told that result to Vali. If you're smart enough, you should be able to discover the original two numbers."

The sages thought for a few minutes, and then:

Ali said," I don't know the original numbers."
"I knew it," Vali replied. (expressing that he knew that Ali didn't know).
"Then I know the numbers," Ali quipped with delight.
"Then I know the numbers too!" exclaimed Vali.

The sages told the original numbers to the Sultan, who was mightily impressed at their intelligence.

Can you determine the original numbers as the sages did?

• en.wikipedia.org/wiki/Sum_and_Product_Puzzle Jul 30, 2015 at 6:23
• It's not a perfect duplicate of the Product and Sum question. But being a well-documented puzzle, it serves little value by existing here. Jul 30, 2015 at 9:59