Use a simpler algorithm for problems 18 & 67