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: import sys
  
  
  def convert(num):
      out = ""
      if num == 0:
          out = "a"
      elif num == 1:
          out = "b"
      elif num == 2:
          out = "c"
      elif num == 3:
          out = "d"
      elif num == 4:
          out = "e"
      elif num == 5:
          out = "f"
      elif num == 6:
          out = "g"
      elif num == 7:
          out = "h"
      elif num == 8:
          out = "i"
      elif num == 9:
          out = "j"
      elif num == 10:
          out = "k"
      elif num == 11:
          out = "l"
      elif num == 12:
          out = "m"
      elif num == 13:
          out = "n"
      elif num == 14:
          out = "o"
      elif num == 15:
          out = "p"
      elif num == 16:
          out = "q"
      elif num == 17:
          out = "r"
      elif num == 18:
          out = "s"
      elif num == 19:
          out = "t"
      elif num == 20:
          out = "u"
      elif num == 21:
          out = "v"
      elif num == 22:
          out = "w"
      elif num == 23:
          out = "x"
      elif num == 24:
          out = "y"
      else:
          out = "z"
      return out
  
  
  s = input()
  L = []
  L.append(s.count("a"))
  L.append(s.count("b"))
  L.append(s.count("c"))
  L.append(s.count("d"))
  L.append(s.count("e"))
  L.append(s.count("f"))
  L.append(s.count("g"))
  L.append(s.count("h"))
  L.append(s.count("i"))
  L.append(s.count("j"))
  L.append(s.count("k"))
  L.append(s.count("l"))
  L.append(s.count("m"))
  L.append(s.count("n"))
  L.append(s.count("o"))
  L.append(s.count("p"))
  L.append(s.count("q"))
  L.append(s.count("r"))
  L.append(s.count("s"))
  L.append(s.count("t"))
  L.append(s.count("u"))
  L.append(s.count("v"))
  L.append(s.count("w"))
  L.append(s.count("x"))
  L.append(s.count("y"))
  L.append(s.count("z"))
  
  flag = 0
  maxlist = []
  for i in range(26):
      if L[i] == max(L):
          maxlist.append(i)
  for j in range(len(maxlist)):
      for i in range(len(s)):
          if s[i] == convert(maxlist[j]):
              if s[i + 1] == convert(maxlist[j]):
                  print("{0} {1}".format(i + 1, i + 2))
                  flag = 1
                  break
              if s[i + 2] == convert(maxlist[j]):
                  print("{0} {1}".format(i + 1, i + 3))
                  flag = 1
                  break
  
  if flag == 0:
      print("{0} {1}".format(-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."}]