from typing import Set


def factors(n:int) -> Set[int]:
    """Iteratively check every possible divisor to find the factors of n"""

    f = set()
    for i in range(1,int(n**0.5)+1):
        if n%i == 0:
            f.add(i)
            f.add(n//i)
    return f