Haskell Solution to euler 5.