
Sam and Priya are two very talented mathematicians.
Their friend Anna approaches them and says: “I have chosen two whole numbers, labeled A and B. Note that A is greater than 1 and B is greater than A. The sum of these numbers does not exceed 100.”
The others nod, so she continues: “In a moment, I will inform Sam of only the sum (A+B), and I will inform Priya of only the product (A×B). These announcements remain private!”
She does so, and the following conversation then takes place:
Priya says, “I don't know the values of A and B.”
Sam responds, “I already knew that.”
“In that case, I do know what their values are,” says Priya.
“Really?”, Sam ponders. “Then so do I.”
Now you too, can know what numbers A and B are.