solve 31, isPrime