prob1 in Haskell
problem 2 in Haskell