Haskell solution to 137