haskell solution for euler 48.