Use Euclid's algorithm and Bezout's identity to find the
smallest positive integer which, when multiplied by 407 then
divided by 607, leaves a remainder of 507.