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 numpy as np
  
  s = [ord(a)-ord('a') for a in input()]
  n = len(s)
  
  if n == 2:
      if s[0] == s[1]:
          print('1 2')
      else
          print('-1 -1')
      exit()
  
  cnt = np.array([0] * 26)
  cum = [cnt.copy()]
  
  for i, a in enumerate(s):
      cnt[a] += 1
      cum.append(cnt.copy())
  
  def is_check(cum, n):
      i = 3
      d = 1
      for j in range(n-i+1):
          for k in cum[j+i] - cum[j]:
              if k > d:
                  return j+1, j+i
      return -1, -1
  
  print(' '.join(map(str, is_check(cum, len(s)))))
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."}]