John and Mary select a natural number each and tell that to Bill. Bill wrote their sum and product in two papers hid one paper and showed the other to John and Mary.
John looked at the number (which was $2002$ ) and declared he couldn't determine Mary's number. Knowing this Mary also said she couldn't determine John's number as well.
What was Mary's Number?
Let $j$ be John number and $m$ be Mary number.
Then $2002=j m $ or $2002=j+m$
Behind John answer,
Assume that $2002$ is not a multiple of $j$ then $2002=j+m$ so John should guess the number.
So $2002$ is a multiple of $j$.
Behind Mary answer,
Similarly $2002$ is a multiple of $m$
Assume that $2002-m$ is not a divisor of $2002$ then $2002=jm$ so Mary should guess the number.
So $2002-m$ is a divisor of $2002$
Conclusion
So $2002-m$ and $m$ are both divisors of $2002$ only for $m=1001$ and $j=2$