spoiler
It's a little difficult to take the puzzle at face value, because we have to guess at how intelligent Mr. Y is. He makes a statement about Mr. Z's deductive powers that is proved to be false, and yet we must assume that Y's statement had some logical motivation, else the puzzle makes no sense. What Y’s statement really means is, “Z cannot figure out what the numbers are, unless I give him a hint, which I inadvertently just did”
Thus we are supposed to deduce the following:
Y's statement provides Z with critical information that he needs in order to figure out the numbers. Which part of Y's statement provides any information?
"I can't figure out the numbers from the sum." All this tells us is that the sum is not 4 or 5. For any other sum, multiple solutions exist.
"Z can't figure out the numbers from the product." This tells us that the product does not have a unique factorization. If the product were something like 34, Z would be able to figure out that the numbers must be 2 and 17, without any input from Y. The same is true of any product of two primes.
Thus the second part of Y's statement tells us that none of the possible number-pair-candidates yielding his sum consists of two primes. If this were not true, he would have to consider the possibility that the two numbers were two primes, in which case he could not state confidence that Z would be unable to figure out his numbers.
Since Y's statement gives Z a necessary clue, it follows that Z has a product for which one possible factorization is consistent with Y's statement, while at least one other possible factorization is not consistent with Y's statement. Specifically, Z's product implies at least one possible number-pair-candidate for which Y's statement would be false -- a number-pair-candidate producing a sum that would have among its solutions a pair of prime numbers.
Some guided trial and error with these conditions in mind yields an excellent candidate for the sum, 11. This is because it yields several possible number-pair-candidates which all involve at least one composite (non-prime) number. These pairs are 2 + 9, 3 + 8, 4 + 7, and 5 + 6.
Now we consider each possible product in turn. If the numbers are 2 and 9, the product is 18. If Z sees 18 on his paper, he knows it can be made by either 2 x 9 or 3 x 6. Does Y's statement further inform him? Yes, because he can now rule out 3 and 6 as a possibility. If the numbers were 3 and 6, the sum would be 9, but a sum of 9 would not permit Y to make his original statement, because of the possibility of 2 and 7. So 2 and 9 is a candidate solution.
How about 3 and 8, making 24? If Z is looking at 24, Y’s statement is again helpful. 24 could also mean that the numbers are 2 and 12, or 4 and 6. If they are 2 and 12, the sum is 14, which would not have permitted Y to make his original statement (3 and 11). So 2 and 12 are out. How about 4 and 6? Similarly, the sum is 10, which would have kept Y silent (3 and 7). So 3 and 8 is also a candidate solution.
Unfortunately, we are now forced to abandon 11 as a possible sum. We can see that Z might be able to deduce his numbers in these scenarios, but Y won’t be able to deduce his, because there are multiple consistent possibilities.
The next candidate sum is 17, for which the possibilities are 2 + 15, 3 + 14, 4 + 13, 5 + 12, 6 + 11, 7 + 10, and 8 + 9. Note that none of these is a pair of primes.
I can’t come up with a better system than examining each possibility in turn. We’re looking for a pair of numbers that results in a product for which there is exactly one corresponding number-pair-candidate that is consistent with Y’s statement.
2 and 15. The product is 30. This wouldn’t help Z, because 30 can also be produced by 5 and 6, which (see above) is another pair of numbers Y might theoretically hold. Since Z can’t narrow down the possibilities any further, the combination of 2 and 15 is out.
3 and 14. The product is 42, which can also be produced by 2 x 21 or 4 x 11. For 2 and 21, the sum is 23, which is another candidate sum for Y, since it cannot be expressed as the sum of two primes. So this also doesn’t give Z enough to go on, and the combination of 3 and 14 is out.
4 and 13. The product is 52, which is also 2 x 26. A sum of 28 would not work for Y, because of the possibility of 5 and 23. There are no other alternatives. So 4 and 13 is a possible solution, since it is the only factorization of 52 consistent with Y’s statement.
5 and 12. The product is 60, which can be made many ways. For 3 x 20, the sum is 23, which would be consistent with Y’s statement. Again we are not able to make a deduction, so the combination of 5 and 12 is out.
6 and 11. The product is 66, which is also 3 x 22 or 2 x 33. For 3 x 22, the sum is 25, which can be expressed as 2 + 23. So the sum cannot be 25. But for 2 x 33, the sum is 35, which cannot be expressed as the sum of two primes. 6 and 11 is out.
7 and 10. The product is 70. For 2 x 35, the sum is 37, which cannot be expressed as the sum of two primes and thus would be consistent with Y’s statement. 7 and 10 is out.
8 and 9. The product of 72 could also be expressed as 3 x 24, for a sum of 27. 27 cannot be expressed as the sum of two primes, so 8 and 9 is out.
For a sum of 17, there is only one number-pair-candidate that would produce a product that would allow Z to work backward and figure out the numbers, and that is 4 and 13. Z sees 52 on his paper, and knows that the possibilities are 4 x 13 or 2 x 26. He reasons that the numbers cannot be 2 and 26, because this would give a sum of 28, and if the sum were 28, Y would have to be wary of the possibility of 5 + 23.
Now it’s Y’s turn. He realizes what Z is up to, and runs through all of the analysis above. Since he is familiar with Goldbach’s conjecture – which unfortunately this author forgot about until deep into the solution, D'OH! – his process of elimination is rather more efficient. Only one pair of numbers would enable Z to reach his conclusion based on Y's hint.
The numbers are 4 and 13.
And in conclusion, Errntknght, I will get you back for this. I'm not sure how, but you can count on it.