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: """
  #kari1 = 'needed' #2 5
  #kari1 = 'atcoder' #-1 -1
  in1 = kari1
  """
  
  in1 = input()
  
  RC = "-1 -1"
  
  str1 = in1[0]
  str2 = in1[1]
  
  if str1 != str2:
      idx1 = 0
      for idx1 in range(2, len(in1) - 2):
          if in1[idx1] == str1:
              RC = str(idx1 - 1) + " " + str(idx1 + 1)
              break
          elif in1[idx1] == str2:
              RC = str(idx1) + " " + str(idx1 + 1)
              break
          else:
              str1 = str2
              str2 = in1[idx1]
  elif str1 == str2:
      RC = "1 2"
  
  print(RC)
  
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."}]