euler problem 3 in haskell