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: import sys,collections
  sys.setrecursionlimit(10**7)
  def Is(): return [int(x) for x in sys.stdin.readline().split()]
  def Ss(): return sys.stdin.readline().split()
  def I(): return int(sys.stdin.readline())
  def S(): return input()
  
  x = S()
  c = 0
  ans = "No"
  for i in range(len(x)):
      for j in range(i,len(x)-i):
          if x[i] == x[i + j]:
              c += 1
      if c = 3:
          ans = "Yes"
  print(ans)
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"}]