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: def solve():
      A, B = map(int, input().split())
  
      if A == B:
          ans = "Draw"
      else:
          if A == 1:
              ans = "Alice"
          elif B == 1:
              ans = "Bob"
          elif A > B:
              ans = "Alice"
          else:
              ans = "Bob"
  
      print(ans)
  
  
  def goodinteger():
      inputstr = input()
      a = inputstr[0]
      b = inputstr[1]
      c = inputstr[2]
      d = inputstr[3]
      count = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
      i = 0
      while i < 10:
          numstr = str(i)
          if a == numstr:
              count[i] += 1
          if b == numstr:
              count[i] += 1
          if c == numstr:
              count[i] += 1
          if d == numstr:
              count[i] += 1
          i += 1
      # print(i)
  
      i = 0
      while i < 10:
          # print(i)
  
          if count[i] >= 3:
              return True
          i += 1
  
      return False
  
  
  if __name__ == "__main__":
      if goodinteger():
          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"}]