Solution for problem 43
Solution for problem 44