output_description: If N is **good** , print `Yes`; otherwise, print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: # -*- coding: utf-8 -*-
  
  
  def arraycount(arr):
      arr_target = [[]]
      cnt = 1
      for i in range(1, len(arr)):
          if arr[i] == arr[i - 1]:
              cnt += 1
          else:
              arr_target.append([arr[i - 1], cnt])
              cnt = 1
      arr_target.append([arr[len(arr) - 1], cnt])
      del arr_target[0]
      return arr_target
  
  
  def digit_list(num):
      num = str(num)
      num = list(num)
      num = list(map(int, num))
      return num
  
  
  n = int(input())
  
  a = arraycount(digit_list(n))
  
  for i in range(len(a)):
      a[i][0], a[i][1] = a[i][1], a[i][0]
  
  a.sort()
  a.reverse()
  
  if a[0][0] >= 3:
      print("Yes")
  else:
      print("No")
  
problem_description: Statement
  
  We call a 4-digit integer with three or more consecutive same digits, such as
  1118, **good**.
  
  You are given a 4-digit integer N. Answer the question: Is N **good**?
samples: [{"input": "1118", "output": "Yes\n    \n\nN is **good** , since it contains three consecutive 1.\n\n* * *"}, {"input": "7777", "output": "Yes\n    \n\nAn integer is also **good** when all the digits are the same.\n\n* * *"}, {"input": "1234", "output": "No"}]