It's a conversation that builds slowly, as only good logical problems do. Each sentence does not provide new information: it erases possibilities.
Sum and product
Riddle statement
Two different integers \(x\) and \(y\) satisfy \(2 \le x < y \le 99\).
One person is told the sum \(S=x+y\), and the other person is told the product \(P=xy\).
Conversation:
1. Product: “I don't know what the numbers are.”
2. Sum: “I already knew it.”
3. Product: “So now I know.”
4. Add: “Then I know them too.”
What are \(x\) and \(y\)?
Show solution
Solution
Answer: $ (x,y)=(4,13). $
The dialogue works because each sentence eliminates an entire block of possibilities.
We work in the domain $ 2\le x<y\le 99, $ and we call $ S=x+y,\qquad P=xy. $
The first sentence—Product does not know the numbers—simply confirms that its product admits more than one valid factorization in the domain.
The second is the decisive one: Sum claims that it already knew that Product could not know. That means that, for every possible decomposition of its sum $ S = a+b, $ the product $ab$ must support more than one valid factorization. In particular, none of those decompositions can be of the form $(2, p)$ with $p$ prime, because in that case the product $2p$ would identify the pair immediately. When applying this sieve to the entire domain, the sums compatible with that second sentence are exactly: $ \{11,17,23,27,29,35,37,41,47,53\}. $
The third sentence: Product, after hearing that, you do manage to identify the pair. Your product has several valid factorizations, but only one of them with a sum belonging to the previous set.
That happens with $ P=52, $ whose valid decompositions are:
$(2,26)$, with sum 28; $(4,13)$, with sum 17.
Of the two, only 17 belongs to the set. Therefore, upon hearing the second sentence, Product concludes that the pair is $ (4,13). $
It remains to verify the fourth sentence: that Sum, knowing $S=17$, can also deduce the pair after listening to Product.
The pairs with sum 17 are:
$(2,15)$, $(3,14)$, $(4,13)$, $(5,12)$, $(6,11)$, $(7,10)$, $(8,9)$.
Its products are, respectively:
$30$, $42$, $52$, $60$, $66$, $70$, $72$.
Suma examines each one and finds that all but 52 remain ambiguous even after the second sentence. Only 52 points unequivocally to $(4,13)$ within the admitted sums. The fourth sentence fits.
The only compatible pairing in the entire dialogue is: $ \boxed{(4,13)}. $