correct solution to euler12