def gcd(a: int, b: int) -> int:
    """
    Finds the Greatest Common Divisor of two integers.
    """
    a, b = abs(a), abs(b)
    # Simple cases
    if b == 0:
        return a

    if a == 0:
        return b

    sort = sorted([a, b])
    if sort[1] % sort[0] == 0:
        return sort[0]
    return gcd(b, a % b)