output_description: If there exists no unbalanced substring of s, print `-1 -1`.
  
  If there exists an unbalanced substring of s, let one such substring be s_a
  s_{a+1} ... s_{b} (1 ≦ a < b ≦ |s|), and print `a b`. If there exists more
  than one such substring, any of them will be accepted.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      s
attempt: s = input()
  
  checker = ''
  
  if len(s) <= 2:
      if s[0] == s[1]:
          print(1, 2)
          checker += '*'
      else:
          print(-1, -1)
          checker += '*'
  
  
  if checker == ''
      for a, b in zip(range(len(s)-1), range(1,len(s))):
          if s[a] == s[b]:
              print(a+1, b+1)
              checker += '*'
              break
  
  if checker == '':
      for a, c in zip(list(range(len(s)-2)), list(range(2, len(s)))):
          if s[a] == s[c]:
              print(a+1, c+1)
              chekcher += '*'
              break
  
  if checker == '':
      print(-1, -1)
  
problem_description: Statement
  
  Given a string t, we will call it _unbalanced_ if and only if the length of t
  is at least 2, and more than half of the letters in t are the same. For
  example, both `voodoo` and `melee` are unbalanced, while neither `noon` nor
  `a` is.
  
  You are given a string s consisting of lowercase letters. Determine if there
  exists a (contiguous) substring of s that is unbalanced. If the answer is
  positive, show a position where such a substring occurs in s.
samples: [{"input": "needed", "output": "2 5\n    \n\nThe string s_2 s_3 s_4 s_5 = `eede` is unbalanced. There are also other\nunbalanced substrings. For example, the output `2 6` will also be accepted.\n\n* * *"}, {"input": "atcoder", "output": "-1 -1\n    \n\nThe string `atcoder` contains no unbalanced substring."}]