add problem8.hs