This is the solution to the the problem of the perfect logicians. You might find 'solutions' for this problem in the web that in essence by listing a large set of numbers and wiping out the 'impossible' ones to arrive at the desired result. Even this relevant Stanford page on the problem, refers to solutions you can hardly bear to look..
The beauty of the problem and of the solution, resides in the elegant modeling. To find the exact solution all you have to do is to feed it to a computer in a form of a computer program and collect the results. My own perspective of elegance is given below:
Making the software for this model is really straightforward. You will find out that the only solution is 4 and 13. You may even try an even larger numbers and find out that 4 and 13 are the only solutions for a large set.
I hope you enjoy this elegance in this as much as I have!