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 bisect,collections,copy,heapq,itertools,math,string
  import sys
  def I():
      # 1 line 1 int
      return int(sys.stdin.readline().rstrip())
  def LI():
      # 1 line n ints
      return list(map(int,sys.stdin.readline().rstrip().split()))
  def S():
      # 1 line 1 string
      return sys.stdin.readline().rstrip()
  def LS():
      # 1 line n strings
      return list(sys.stdin.readline().rstrip().split())
  
  A = S()
  
  if A[0] == A[1] == A[2] or
     A[1] == A[2] == A[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"}]