Haskell solution to euler 63.