Buggy python submission (verdict: Runtime Error):
s=input()
flag=0
if len(s)==2:
    if s[0]==s[1]:
        print('1 2')
    else:
        print('-1 -1')
else:
    for i in range(len(s)-2):
        if s[i]==s[i+2] and s[i]!=s[i+1]:
            print(f'{i+1} {i+3}')
            flag=1
            break
        elif s[i]==s[i+1] and s[i]!=s[i+2]:
            print(f'{i+1} {i+3}')
            flag=1
            break
        elif s[i+1]==s[i+2] and s[i+1]!=s[i]:
            print(f'{i+1} {i+3}')
            flag=1
            break
    if flag==0:
        print('-1 -1')
            
    

                


Fixed submission:
s=input()
flag=0
if len(s)==2:
    if s[0]==s[1]:
        print('1 2')
    else:
        print('-1 -1')
else:
    for i in range(len(s)-2):
        if s[i]==s[i+2] and s[i]!=s[i+1]:
            print(str(i+1)+' '+str(i+3))
            flag=1
            break
        elif s[i]==s[i+1] and s[i]!=s[i+2]:
            print(str(i+1)+' '+str(i+3))
            flag=1
            break
        elif s[i+1]==s[i+2] and s[i+1]!=s[i]:
            print(str(i+1)+' '+str(i+3))
            flag=1
            break
    if flag==0:
        print('-1 -1')

Buggy python submission (verdict: Runtime Error):
s=input()
flag=0
if len(s)==2:
    if s[0]==s[1]:
        print('1 2')
    else:
        print('-1 -1')
else:
    for i in range(len(s)-2):
        if s[i]==s[i+2] and s[i]!=s[i+1]:
            print(f'{i+1} {i+3}')
            flag=1
            break
        elif s[i]==s[i+1] and s[i]!=s[i+2]:
            print(f'{i+1} {i+3}')
            flag=1
            break
        elif s[i+1]==s[i+2] and s[i+1]!=s[i]:
            print(f'{i+1} {i+3}')
            flag=1
            break
    if flag==0:
        print('-1 -1')
            
    

                


Fixed submission:
s=input()
flag=0
if len(s)==2:
    if s[0]==s[1]:
        print('1 2')
    else:
        print('-1 -1')
else:
    for i in range(len(s)-2):
        if s[i]==s[i+2] and s[i]!=s[i+1]:
            print(str(i+1)+' '+str(i+3))
            flag=1
            break
        elif s[i]==s[i+1] and s[i]!=s[i+2]:
            print(str(i+1)+' '+str(i+3))
            flag=1
            break
        elif s[i+1]==s[i+2] and s[i+1]!=s[i]:
            print(str(i+1)+' '+str(i+3))
            flag=1
            break
    if flag==0:
        print('-1 -1')

Buggy python submission (verdict: Runtime Error):
s=input()
dic={}
key_letters=[]
flag=0
for letter in s:
    if letter not in dic.keys():
        dic[letter]=1
    else:
        dic[letter]+=1
for key,value in dic.items():
    if value>=len(s)/2:
        key_letters.append(key)
        flag=1

if flag==0:
    print('-1 -1')
else:
    for i in range(len(s)):
        if s[i] in key_letters and s[i]==s[i+1]:
            print(str(i+1)+' '+str(len(s)))
            break



        


Fixed submission:
s=input()
flag=0
if len(s)==2:
    if s[0]==s[1]:
        print('1 2')
    else:
        print('-1 -1')
else:
    for i in range(len(s)-2):
        if s[i]==s[i+2] and s[i]!=s[i+1]:
            print(str(i+1)+' '+str(i+3))
            flag=1
            break
        elif s[i]==s[i+1] and s[i]!=s[i+2]:
            print(str(i+1)+' '+str(i+3))
            flag=1
            break
        elif s[i+1]==s[i+2] and s[i+1]!=s[i]:
            print(str(i+1)+' '+str(i+3))
            flag=1
            break
    if flag==0:
        print('-1 -1')

Buggy python submission (verdict: Runtime Error):
s=input()
dic={}
key_letters=[]
flag=0
for letter in s:
    if letter not in dic.keys():
        dic[letter]=1
    else:
        dic[letter]+=1
for key,value in dic.items():
    if value>=len(s)//2:
        key_letters.append(key)
        flag=1

if flag==0:
    print('-1 -1')
else:
    for i in range(len(s)):
        if s[i] in key_letters and s[i]==s[i+1]:
            print(str(i+1)+' '+str(len(s)))
            break
            

            


        


Fixed submission:
s=input()
flag=0
if len(s)==2:
    if s[0]==s[1]:
        print('1 2')
    else:
        print('-1 -1')
else:
    for i in range(len(s)-2):
        if s[i]==s[i+2] and s[i]!=s[i+1]:
            print(str(i+1)+' '+str(i+3))
            flag=1
            break
        elif s[i]==s[i+1] and s[i]!=s[i+2]:
            print(str(i+1)+' '+str(i+3))
            flag=1
            break
        elif s[i+1]==s[i+2] and s[i+1]!=s[i]:
            print(str(i+1)+' '+str(i+3))
            flag=1
            break
    if flag==0:
        print('-1 -1')