poj 1091 flea - number theory