• + 0 comments

    import re

    s = input() k = input() pattern = rf"(?=({re.escape(k)}))" if matches := list(re.finditer(pattern, s)):

    for match in matches:
        print((match.start(1),int(match.end(1) - 1)))
    

    else: print((-1, -1))