euler p2 in haskell