Solved Euler12.