Haskell solution to Euler 69.