Buggy python submission (verdict: Runtime Error):
import sys
import string
 
alphabets=list(string.ascii_lowercase)
 
s=input()
 
l=len(s)
 
hm = lambda a,string: sum([x==a for x in string])
 
for x in range(l-1):
  if s[x]==s[x+1]:
    print('{} {}'.format(x+1, x+2))
    sys.exit()
 
 
for n in range(l-3):
  for a in alphabets:
    if hm(a,s[n:n+3])> m//2:
      print('{} {}'.format(n+1,n+3))
      sys.exit()
print('-1 -1')

Fixed submission:
import sys
import string
 
alphabets=list(string.ascii_lowercase)
 
s=input()
 
l=len(s)
 
hm = lambda a,string: sum([x==a for x in string])
 
for x in range(l-1):
  if s[x]==s[x+1]:
    print('{} {}'.format(x+1, x+2))
    sys.exit()
 
 
for n in range(l-3):
  for a in alphabets:
    if hm(a,s[n:n+3])> 1:
      print('{} {}'.format(n+1,n+3))
      sys.exit()
print('-1 -1')

Buggy python submission (verdict: Runtime Error):
import sys
import string

alphabets=list(string.ascii_lowercase)

s=input()

l=len(s)

hm = lambda a,string: sum([x==a for x in string])

for x in range(l-1):
  if s[x]==s[x+1]:
    print('{} {}'.format(x+1, x+2))
    sys.exit()


for n in range(l-m):
  for a in alphabets:
    if hm(a,s[n:n+3])> m//2:
      print('{} {}'.format(n+1,n+m))
      sys.exit()
print('-1 -1')

Fixed submission:
import sys
import string
 
alphabets=list(string.ascii_lowercase)
 
s=input()
 
l=len(s)
 
hm = lambda a,string: sum([x==a for x in string])
 
for x in range(l-1):
  if s[x]==s[x+1]:
    print('{} {}'.format(x+1, x+2))
    sys.exit()
 
 
for n in range(l-3):
  for a in alphabets:
    if hm(a,s[n:n+3])> 1:
      print('{} {}'.format(n+1,n+3))
      sys.exit()
print('-1 -1')

Buggy python submission (verdict: Time Limit Exceeded):
import sys
import string
 
alphabets=list(string.ascii_lowercase)
 
s=input()
 
l=len(s)
 
hm = lambda a,string: sum([x==a for x in string])
 
for x in range(l-1):
  if s[x]==s[x+1]:
    print('{} {}'.format(x+1, x+2))
    sys.exit()
 
def func(r,s,n,m):
  if r==26:
    return
  else:
    if hm(alphabets[r],s[n:n+m])>m//2:
      print('{} {}'.format(n+1,n+m))
      sys.exit()
    return func(r+1,s,n,m)
 
for m in range(3,l,2):
  for n in range(l-m):
    func(0,s,n,m)
print('-1 -1')

Fixed submission:
import sys
import string
 
alphabets=list(string.ascii_lowercase)
 
s=input()
 
l=len(s)
 
hm = lambda a,string: sum([x==a for x in string])
 
for x in range(l-1):
  if s[x]==s[x+1]:
    print('{} {}'.format(x+1, x+2))
    sys.exit()
 
 
for n in range(l-3):
  for a in alphabets:
    if hm(a,s[n:n+3])> 1:
      print('{} {}'.format(n+1,n+3))
      sys.exit()
print('-1 -1')

Buggy python submission (verdict: Runtime Error):
import sys
import string

alphabets=list(string.ascii_lowercase)

s=input()

l=len(s)

hm = lambda a,string: sum([x==a for x in string])

for x in range(l-1):
  if s[x]==s[x+1]:
    print('{} {}'.format(x+1, x+2))
    sys.exit()

def func(r,s,n,m):
  if r==26:
    return print('-1 -1')
  else:
    if hm(alphabets[r],s[n:n+m])>m//2:
      print('{} {}'.format(r+1,n+m))
      sys.exit()
    return func(n+1,s,n,m)

for m in range(3,l,2):
  for n in range(l-m):
    func(0,s,n,m)

Fixed submission:
import sys
import string
 
alphabets=list(string.ascii_lowercase)
 
s=input()
 
l=len(s)
 
hm = lambda a,string: sum([x==a for x in string])
 
for x in range(l-1):
  if s[x]==s[x+1]:
    print('{} {}'.format(x+1, x+2))
    sys.exit()
 
 
for n in range(l-3):
  for a in alphabets:
    if hm(a,s[n:n+3])> 1:
      print('{} {}'.format(n+1,n+3))
      sys.exit()
print('-1 -1')

Buggy python submission (verdict: Runtime Error):
import sys
import string

alphabets=list(string.ascii_lowercase)

s=input()

l=len(s)

hm = lambda a,string: sum([x==a for x in string])

for x in range(l-1):
  if s[x]==s[x+1]:
    print('{} {}'.format(x+1, x+2))
    sys.exit()

def func(r,s,n,m):
  if r==26:
    return print('-1 -1')
  else:
    if hm(alphabets[r],s[n:n+m])>m//2:
      print('{} {}'.format(n+1,n+m))
      sys.exit()
    return func(n+1,s,n,m)

for m in range(3,l,2):
  for n in range(l-m):
    func(0,s,n,m)

Fixed submission:
import sys
import string
 
alphabets=list(string.ascii_lowercase)
 
s=input()
 
l=len(s)
 
hm = lambda a,string: sum([x==a for x in string])
 
for x in range(l-1):
  if s[x]==s[x+1]:
    print('{} {}'.format(x+1, x+2))
    sys.exit()
 
 
for n in range(l-3):
  for a in alphabets:
    if hm(a,s[n:n+3])> 1:
      print('{} {}'.format(n+1,n+3))
      sys.exit()
print('-1 -1')

Buggy python submission (verdict: Time Limit Exceeded):
import sys
import string

alphabets=list(string.ascii_lowercase)

s=input()

l=len(s)

hm = lambda a,string: sum([x==a for x in string])

for x in range(l-1):
  if s[x]==s[x+1]:
    print('{} {}'.format(x+1, x+2))
    sys.exit()

for m in range(3,l,2):
  for n in range(l-m):
    for a in alphabets:
      if hm(a,s[n:n+m])> m//2:
        print('{} {}'.format(n+1,n+m))
        sys.exit()
print('-1 -1')

Fixed submission:
import sys
import string
 
alphabets=list(string.ascii_lowercase)
 
s=input()
 
l=len(s)
 
hm = lambda a,string: sum([x==a for x in string])
 
for x in range(l-1):
  if s[x]==s[x+1]:
    print('{} {}'.format(x+1, x+2))
    sys.exit()
 
 
for n in range(l-3):
  for a in alphabets:
    if hm(a,s[n:n+3])> 1:
      print('{} {}'.format(n+1,n+3))
      sys.exit()
print('-1 -1')