Solved pb002, haskell