Draft for the euler 59 problem.