text: The more general problem is 1/x + 1/y = 1/M for some M.\n\nIt turns out that the way to find all solutions for integers is to find all factorizations:\n\n    M^2 = A*B  (A,B!=-M)\n\nthen the solution is x=A+M and y=B+M.\n\nIt's easy to show that this works:\n\n   1/x + 1/y = (x+y)/xy = (A+B+2M)/(A+M)(B+M)\n\nBut (A+M)(B+M) = AB + (A+B)M + M^2 \n    = (A+B)M + 2M^2  (since AB = M^2)\n    = M(A+B+2M)\n\nSo 1/x + 1/y = 1/M\n\nOn the other hand, if 1/x + 1/y = 1/M,\nthen xy = M(x+y).  Subtract M(x+y) from both sides, then add M^2 to both sides, and you get:\n\n  (x-M)(y-M) = M^2\n\nSo, in the case of M=99, we are looking to factor\n99^2 = 3^4 * 11^2 = 9801.\n\nA=1, B=9801, x = 100, y=9900\nA=3, B=3267, x = 102, y=3366\nA=9, B=1089, x = 108, y=1188\nA=11, B=891, x = 110, y=990\nA=27, B=363, x = 126, y=462\nA=33, B=297, x = 132, y=396\nA=81, B=121, x = 180, y=220\nA=99, B=99, x = 198, y=198\n(Case where A>B just switches x and y, so we skip those.)\nA=-1, B=-9801, x=98, y=-9702\nA=-3, B=-3267, x=96, y=-3168\nA=-9, B=-1089, x=90, y=-990\nA=-27, B=-363, x=72, y=-264\nA=-33, B=-297, x=66, y=-198\nA=-81, B=-121, x=18, y=-22\nA=-99, B=-99, x=0, y=0 (obviously not a solution)\n\nAgain for |A|>|B|, we just switch the x and y.\n\nSo, that's all your solutions.