def is_perfect_slow(n):
    """ decides if a given integer n is a perfect number or not
        this is the straightforward implementation
    """
    if n <= 0:
        return(False)
    sum = 0
    for i in range(1,n):
        if n % i == 0:
            sum += i
    return(sum == n)