def digadd(c, d, e):
    """
    Parameters
    ----------
    c : carry bit
    d : int
    digit
    e : int
    digit .
    Returns
    -------
    A pair (c ’,a) where a is the digit resulting from
    the sum of digits d,e and the carry bit c,
    and c’ is the resulting carry bit
    """
    if c < 0 or d < 0 or e < 0 or c > 1 or d > 9 or e > 9:
        return -1, -1
    a = c + d + e
    return a // 10, a % 10

    # Complexity: Θ(1)