from math import floor, sqrt


def is_prime_given_primes(num, primes):
    """
    Determine if a number is prime, given an ascending list of prime numbers below its square root.
    """

    assert primes[-1] >= floor(sqrt(num))
    for _p in primes:
        if _p > floor(sqrt(num)):
            break
        if num % _p == 0:
            return False
    return True