problem 3 and isPrime