And here is the number you are probably thinking of:
It works only for $ab$ where $a \le b$. I suppose that it is a mistake in the problem statement. Others have proven that as it is, the problem is unsolvable.
And here is how I came to that number.
PS: I have been playing with this problem. You can extend it to $ab$ with $a > b$ with the ...