def find_infinite_loop(instructions: list) -> tuple:
    """Find the infinite loop in the program, and return the accumulator

    :param instructions: List of instructions in the program
    :return: Value of the accumulator, and a flag
    """
    accumulator = 0
    line = 0
    line_history = []
    flag = -1
    while line not in line_history:
        try:
            operation, argument = instructions[line]
        except IndexError:
            flag = 0
            return accumulator, flag

        if operation == 'acc':
            accumulator += argument
            line_history.append(line)
            line += 1
        elif operation == 'jmp':
            line_history.append(line)
            line += argument
        elif operation == 'nop':
            line_history.append(line)
            line += 1
    return accumulator, flag