// how this function checks if a number is prime or not
bool isPrime(ll n){ if(n == 2LL) return 1; if(n%2LL == 0LL) return 0; for(