Two perfect logicians Steve and Pete, who have never met, before are imprisoned by an eccentric villain. "I have two positive integer numbers x and y" he says to them. "I will tell Steve the sum x+y, and Pete the product xy. If at any point either of you know the two numbers x and y, you may shout them out, and I will release you both. You may take turns saying statements giving the other information, but you may only communicate about your state of knowledge. If any part of your statement contains any information about the numbers themselves, you'll both be shot. If any of you tries to communicate any other information not directly implied by the statements, you'll both be shot."
Can the logicians always figure out the numbers?
As an example, if the two numbers are 1 and 6, a potential conversation could go:
P: I don't know the numbers
S: I don't know the numbers
P: I don't know the numbers
S: I don't know the numbers
P: I know the numbers! They are 1 and 6! (S would have known if the numbers were 2 and 3)
Or another example, if the numbers are 2 and 4:
P: I don't know the numbers
S: I didn't know whether you knew until you said that (could have been 1 and 5, and P would obviously have known, as 5 can only be factorized as 1x5)
P: I know the numbers! They are 2 and 4! (S couldn't have said that if the numbers were 1 and 8)
Is there always some strategy like this? (Note that the logicians are not able to communicate beforehand, and each logician must attempt to give useful information based on what they know)
Edit: The question has been raised whether just saying "I don't know" until someone figures it out would work for all possible answers. It doesn't. In order to show this, all one needs to do is construct a "cycle" of possibilities, with each consecutive pair alternatively having the same sum or the same product. Those pairs would be indistinguishable for S and P for all time unless more information is given than "I don't know the numbers"
A simple cycle is given by (2,5)->(3,4)->(1,12)->(3,10)->(5,6)->(1,10)->(2,5).
One could argue that simply eliminating the possibility of having 1 as one of the numbers would solve this problem. But by merely doubling the cycle, this is shown to be false: (4,10)->(6,8)->(2,24)->(6,20)->(10,12)->(2,20)->(4,10). Thus, removing 1 only delays the problem.
Edit 2: As the condition about only talking about states of knowledge is ambiguous, I have decided that a new version is: The logicians can only say either they know/don't know the numbers, or that they knew/didn't know what the previous person just said.
For example, if the numbers are 3 and 4, a conversation could go:
P: I don't know the numbers (could be 1 and 12 or 2 and 6)
S: I knew you didn't (even if the numbers were 2 and 5 or 3 and 4, P wouldn't have known)
P: I didn't know that (S couldn't have said that if the numbers were 2 and 6. However, this doesn't yet eliminate 1 and 12)
S: I know the numbers! They are 3 and 4! (the previous statement eliminated the other options)