problem 16 haskell
problem 17 haskell