Solved
While cleaning up I noticed that I forgot to post the solution using Euklids algorithm. So before the file is deleted, I post it here.
Here we have no problem with numbers too high, as it seems.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

