import math


def is_prime(n):
    """
    This function returns a boolean value indicating whether
    the input `n' is a primer number or not.
    """
    # handle edge cases
    if n == 1:
        return False
    elif n == 2:
        return True
    elif n % 2 == 0:
        return False

    for i in range(int(math.sqrt(n)+1)):
        if (i == 0) or (i == 1):
            continue
        if (n % i) == 0:
            return False
    return True