Project Euler 107