output_description: Print the necessary number of candies in total.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N
attempt: s = input()
  temp = 0
  tem = 0
  tot = 0
  if len(s) > 10**3:
  
      for i in range(len(s)):
          tem = 1
          temp = 1
          flag = 0
          for j in range(i + 1, len(s)):
              if s[j] == s[i]:
                  temp += 1
              tem += 1
              if temp > (tem // 2):
                  print(i + 1, j + 1)
  
                  flag = 1
                  tot = 1
                  break
          if flag:
              break
      if tot == 0:
          print("-1 -1")
  else:
      for i in range(len(s) - 2):
          if s[i] == s[i + 1]:
              print(i + 1, i + 2)
              flag = 1
              break
          elif s[i] == s[i + 2]:
              print(i + 1, i + 3)
              flag = 1
              break
      if flag == 0:
          print("-1 -1")
  
problem_description: Statement
  
  There are N children in AtCoder Kindergarten. Mr. Evi will arrange the
  children in a line, then give 1 candy to the first child in the line, 2
  candies to the second child, ..., N candies to the N-th child. How many
  candies will be necessary in total?
samples: [{"input": "3", "output": "6\n    \n\nThe answer is 1+2+3=6.\n\n* * *"}, {"input": "10", "output": "55\n    \n\nThe sum of the integers from 1 to 10 is 55.\n\n* * *"}, {"input": "1", "output": "1\n    \n\nOnly one child. The answer is 1 in this case."}]