problem 7

used the prime lib.