def is_prime(n):
    """Checks if a number is a prime number."""
    if n <= 2: return False
    if n % 2 == 0: return False

    i = 3
    while i < n**0.5+1:
        if n % i == 0: return False
        i += 2

    return True