import math


def isPrime(n):
    """Return True if n is prime, False otherwise"""
    if (n % 2 == 0):
        return False
    divisor = 3
    root = math.ceil(math.sqrt(n))
    while (divisor <= root):
        if (n % divisor == 0):
            return False
        divisor += 2
    return True