Euler 9 and 10 in Haskell