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?

-----Constraints-----
 - 1000 ≤ N ≤ 9999
 - N is an integer.

-----Input-----
Input is given from Standard Input in the following format:
N

-----Output-----
If N is good, print Yes; otherwise, print No.

-----Sample Input-----
1118

-----Sample Output-----
Yes

N is good, since it contains three consecutive 1.
[{"code": "n = input()\nprint(\"Yes\" if n[0] == n[1] == n[2] or n[1] == n[2] == n[3] else \"No\")", "passed": true, "time": 0.15, "memory": 14052.0, "status": "done"}, {"code": "N = list(input())\nif N[0] == N[1] and N[0] == N[2]:\n    print('Yes')\nelif N[1] == N[2] and N[2] == N[3]:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.3, "memory": 14104.0, "status": "done"}, {"code": "# 079a\n\ndef atc_079a(input_value: str) -> str:\n    n = 3\n    for i in range(0, len(input_value) + 1 - n):\n        for j in range(1, n):\n            if input_value[i] != input_value[i + j]:\n                break\n            if j == n - 1:\n                return \"Yes\"\n    return \"No\"\n\ninput_value = input()\nprint((atc_079a(input_value)))\n", "passed": true, "time": 0.25, "memory": 14152.0, "status": "done"}, {"code": "s = input()\nif s[0] == s[1] == s[2] or s[1] == s[2] == s[3]:\n    print(\"Yes\")\nelif s[0] == s[1] == s[2] == s[3]:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.24, "memory": 14088.0, "status": "done"}, {"code": "N = input()\n\n\nprint((\"Yes\" if N[0] == N[1] == N[2] or N[1] == N[2] == N[3] else \"No\"))\n", "passed": true, "time": 1.79, "memory": 14048.0, "status": "done"}, {"code": "N = input()\n\ndata_list = str(N)\n\nif data_list[0] == data_list[1] == data_list[2]:\n    print('Yes')\nelif data_list[1] == data_list[2] == data_list[3]:\n    print('Yes')\nelif data_list[0] == data_list[1] == data_list[2] == data_list[3]:\n    print('Yes')\nelse:\n    print('No')\n\n", "passed": true, "time": 0.14, "memory": 14292.0, "status": "done"}, {"code": "N = input()\n\nif N[0] == N[1] and N[1] == N[2]:\n    print(\"Yes\")\nelif N[1] == N[2] and N[2] == N[3]:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.3, "memory": 14104.0, "status": "done"}, {"code": "N = str(input())\n\nif N[0] == N[1] == N[2]:\n    print('Yes')\nelif N[1] == N[2] == N[3]:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.25, "memory": 14332.0, "status": "done"}, {"code": "x = input()\nif x[1] == x[2] and (x[0] == x[1] or x[2] == x[3]  ):\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.17, "memory": 14060.0, "status": "done"}, {"code": "n = input()\ncnt = 1\nfor i in range(len(n)-1):\n  if n[i] == n[i+1]:\n    cnt += 1\n  else:\n    cnt = 1\n  if cnt >= 3:\n    print(\"Yes\")\n    return\n    \nprint('No')", "passed": true, "time": 0.15, "memory": 14100.0, "status": "done"}, {"code": "# 079_a\nN=int(input())\n# if 1<=N and N<=9999:\n#\nn=str(N)\nif (n[0]==n[1] and n[1]==n[2]) or (n[1]==n[2] and n[2]==n[3]):\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.24, "memory": 14304.0, "status": "done"}, {"code": "N = input()\ncheck = False\nfor i in range(2):\n  if N[i:i+3] == N[i] * 3:\n    check = True\n    \nprint(\"Yes\" if check else \"No\")", "passed": true, "time": 0.26, "memory": 14280.0, "status": "done"}, {"code": "S=input()\nif S[0]==S[1]==S[2] or S[1]==S[2]==S[3]:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.26, "memory": 14192.0, "status": "done"}, {"code": "s = input()\nif s[0] == s[1] == s[2] or s[1] == s[2] == s[3]:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.31, "memory": 14296.0, "status": "done"}, {"code": "a,b,c,d = input()\nif (a==b==c) or (b==c==d):\n\tprint(\"Yes\")\nelse:\n\tprint(\"No\")", "passed": true, "time": 0.27, "memory": 14192.0, "status": "done"}, {"code": "N = str(input())\nif N[0] == N[1] == N[2] or N[1] == N[2] == N[3]:\n    result = 'Yes'\nelse:\n    result = 'No'\n\nprint(result)", "passed": true, "time": 0.15, "memory": 14084.0, "status": "done"}, {"code": "n = str(input())\nif n[0] == n[1] == n[2] or n[3] == n[1] == n[2]:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.15, "memory": 14276.0, "status": "done"}, {"code": "N = input()\nif N[0] == N[1] == N[2] or N[1] == N[2] == N[3] :\n    print('Yes')\nelse:\n    print('No')\n\n", "passed": true, "time": 0.15, "memory": 14072.0, "status": "done"}, {"code": "N = input()\nanswer = list(N)\n\nif answer[0] == answer[1] == answer[2]:\n    print(\"Yes\")\nelif answer[1] == answer[2] == answer[3]:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "X = input()\n\nif X[0] == X[1] == X[2] or X[1] == X[2] == X[3]:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.14, "memory": 14224.0, "status": "done"}, {"code": "N = str(input())\n\nif N[0] == N[1] == N[2] or N[1] == N[2] == N[3]:\n    result = \"Yes\"\nelse:\n    result = \"No\"\n\nprint(result)\n", "passed": true, "time": 0.14, "memory": 14072.0, "status": "done"}, {"code": "n = input()\n\nif n[0] == n[1] == n[2] or n[1] == n[2] == n[3]:\n  print('Yes')\nelse:\n  print('No')", "passed": true, "time": 0.14, "memory": 14028.0, "status": "done"}, {"code": "#!/usr/bin/env python3\nimport sys\nsys.setrecursionlimit(10**6)\n\nn = str(int(input()))\n\nflag = False\nif n[0] == n[1] and n[1] == n[2]:\n    flag = True\nif n[1] == n[2] and n[3] == n[2]:\n    flag = True\n\nif flag:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.23, "memory": 14172.0, "status": "done"}, {"code": "a=input()\nif a[0]==a[1]==a[2] or a[1]==a[2]==a[3]:print(\"Yes\")\nelse:print(\"No\")", "passed": true, "time": 0.14, "memory": 14056.0, "status": "done"}, {"code": "# A - Good Integer\n# https://atcoder.jp/contests/abc079/tasks/abc079_a\n\ns = input()\n\nif len(set(s[:3])) == 1 or len(set(s[1:])) == 1:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "N=input()\n#N\u306ei\u6587\u5b57\u76ee\u3068i\uff0b1\u6587\u5b57\u76ee\u304c\u540c\u3058\u3067\u3042\u308c\u3070\u30ab\u30a6\u30f3\u30c8\u3092\u5897\u3084\u3059\u3002\nj_count=0\nfor i in range(0,3):\n    if N[i]==N[i+1]:\n        j_count+=1\nif j_count>=2 and N[1]==N[2]:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.14, "memory": 14336.0, "status": "done"}, {"code": "N = input()\ns1 = N[1:len(N)]\ns2 = N[0:len(N) - 1]\nisOk = True\nfor i in range(1, len(N)-1):\n    if s1[i] != s1[i - 1]:\n        isOk = False\n        break\n    else:\n        continue\n\nif isOk:\n    print('Yes')\n    return\n\nisOk = True\nfor i in range(1, len(N)-1):\n    if s2[i] != s2[i - 1]:\n        isOk = False\n        break\n    else:\n        continue\n\nif isOk:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.14, "memory": 14124.0, "status": "done"}, {"code": "n = input()\nprint(('Yes' if n[0]==n[1]==n[2] or n[1]==n[2]==n[3] else 'No'))\n", "passed": true, "time": 0.14, "memory": 14188.0, "status": "done"}, {"code": "n = input()\nprint(\"Yes\" if n[0] == n[1] == n[2] or n[1] == n[2] == n[3] else \"No\")      ", "passed": true, "time": 0.24, "memory": 14004.0, "status": "done"}, {"code": "n = list(input())\nlist01 = list(set(n[0:3]))\nlist02 = list(set(n[1:4]))\nif len(list01) == 1 or len(list02) == 1:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}, {"code": "N = input()\n\nif N[0] == N[1] ==N[2] or N[1] == N[2] == N[3] :\n    print( \"Yes\" )\nelse:\n    print( \"No\" )", "passed": true, "time": 0.23, "memory": 14092.0, "status": "done"}, {"code": "N = list(map(str, input()))\nif N[0] == N[1] == N[2] or N[1] == N[2] == N[3] :\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.24, "memory": 14048.0, "status": "done"}, {"code": "s = input()\nprint((\"Yes\" if (s[1]==s[2] and (s[0]==s[1] or s[3]==s[1]))   else \"No\"))\n", "passed": true, "time": 0.2, "memory": 14168.0, "status": "done"}, {"code": "def main():\n    x = input()\n\n    if len(set(x[:3])) == 1 or len(set(x[1:])) == 1:\n        print(\"Yes\")\n    else:\n        print(\"No\")\n\nmain()", "passed": true, "time": 0.17, "memory": 14048.0, "status": "done"}, {"code": "numbers = input()\n\nif numbers[1] == numbers[2]:\n    if numbers.count(numbers[1]) >= 3:\n        print(\"Yes\")\n        return\n\nprint(\"No\")\n", "passed": true, "time": 0.36, "memory": 14216.0, "status": "done"}, {"code": "N = input()\n\nif N[0] == N[1] == N[2] or N[1] == N[2] == N[3]:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.21, "memory": 14196.0, "status": "done"}, {"code": "N = input()\nif N[1] == N[2]:\n    if N[0] == N[1] or N[2] == N[3]:\n        print(\"Yes\")\n    else:\n        print(\"No\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.15, "memory": 14084.0, "status": "done"}, {"code": "import bisect,collections,copy,heapq,itertools,math,string\nimport sys\ndef I():\n    # 1 line 1 int\n    return int(sys.stdin.readline().rstrip())\ndef LI():\n    # 1 line n ints\n    return list(map(int,sys.stdin.readline().rstrip().split()))\ndef S():\n    # 1 line 1 string\n    return sys.stdin.readline().rstrip()\ndef LS():\n    # 1 line n strings\n    return list(sys.stdin.readline().rstrip().split())\n\nA = S()\n\nif A[0] == A[1] == A[2] or A[1] == A[2] == A[3]:\n   print(\"Yes\")\nelse:\n   print(\"No\")\n\n\n", "passed": true, "time": 0.18, "memory": 14140.0, "status": "done"}, {"code": "N = input()\n\nif N[0] == N[1] == N[2] == N[3]:\n    print('Yes')\nelif N[0] == N[1] == N[2] or N[1] == N[2] == N[3]:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14328.0, "status": "done"}, {"code": "n = input('')\n# \u540c\u3058\u6570\u5b57\u304c3\u304b4\u500b\nif n[0] == n[1] == n[2] or n[1] == n[2] == n[3]:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.15, "memory": 14228.0, "status": "done"}, {"code": "def atc_079a(input_value: str) -> str:\n    n = 3\n    for i in range(0, len(input_value) + 1 - n):\n        for j in range(1, n):\n            if input_value[i] != input_value[i + j]:\n                break\n            if j == n - 1:\n                return \"Yes\"\n    return \"No\"\n\n\ninput_value = input()\nprint(atc_079a(input_value))", "passed": true, "time": 0.17, "memory": 14036.0, "status": "done"}, {"code": "def iroha():\n    num = list(input())\n    count = 0\n    head = num[0]\n\n    for i, char in enumerate(num):\n        if head == num[i]:\n            count += 1\n            if count >= 3:\n                print('Yes')\n                return\n        else:\n            count = 1\n            head = num[i]\n    \n    print('No')\n        \n\n\ndef __starting_point():\n    iroha()\n\n__starting_point()", "passed": true, "time": 0.17, "memory": 14260.0, "status": "done"}, {"code": "N = input()\n\nif N[0] == N[1] == N[2] or N[1] == N[2] == N[3]:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.17, "memory": 14060.0, "status": "done"}, {"code": "N=list(input())\n\nif N[0]==N[1]==N[2] or N[1]==N[2]==N[3]:\n    print('Yes')\nelse:\n    print('No')\n\n", "passed": true, "time": 0.22, "memory": 14032.0, "status": "done"}, {"code": "N = input('')\nif N[0] == N[1] == N[2] or N[1] == N[2] == N[3] or N[0] == N[1] == N[2] == N[3]:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.15, "memory": 14192.0, "status": "done"}, {"code": "li = list(input())\n\nif li[0] == li[1] and li[1] == li[2]:\n    print('Yes')\nelif li[1] == li[2] and li[2] == li[3]:\n    print('Yes')\nelif li[0] == li[1] and li[0] == li[2] and li[0] == li[3]:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.14, "memory": 14244.0, "status": "done"}, {"code": "s = input()\nif len(set(s[:3])) == 1 or len(set(s[1:])) == 1:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.15, "memory": 14192.0, "status": "done"}, {"code": "N = input()\nprint('Yes' if (N[0] == N[1] == N[2]) or (N[1] == N[2] == N[3]) else 'No')", "passed": true, "time": 0.21, "memory": 14304.0, "status": "done"}, {"code": "n=input()\nif n[0]==n[1]==n[2] or n[1]==n[2]==n[3]:print('Yes')\nelse:print('No')", "passed": true, "time": 0.14, "memory": 14152.0, "status": "done"}, {"code": "S = input()\nif len(list(set(S[:-1]))) == 1 or len(list(set(S[1:]))) == 1:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14100.0, "status": "done"}, {"code": "N = input()\n\nif N[0] == N[1] == N[2] or N[1] == N[2] == N[3]:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.14, "memory": 14256.0, "status": "done"}, {"code": "n=input()\nif len(set(n[:3]))==1 or len(set(n[1:4]))==1:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14296.0, "status": "done"}, {"code": "n=list(input())\nif len(set(n[:3]))==1 or len(set(n[1:]))==1:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14276.0, "status": "done"}, {"code": "a, b, c, d = input()\nprint('Yes' if a == b == c or b == c == d else 'No')", "passed": true, "time": 0.15, "memory": 14052.0, "status": "done"}, {"code": "n = str(input())\n\nif n[0] == n[1] == n[2] or n[1] == n[2] == n[3]:\n  print('Yes')\n  \nelse:\n  print('No')", "passed": true, "time": 0.14, "memory": 14060.0, "status": "done"}, {"code": "n = input()\nif n[0]==n[1]==n[2] or n[1]==n[2]==n[3]:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14152.0, "status": "done"}, {"code": "n = input()\nif (n[0] == n[1] == n[2]) or (n[1] == n[2] == n[3]):\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.14, "memory": 14224.0, "status": "done"}, {"code": "import sys\nn = input()\ncand = [str(i) + str(i) + str(i) for i in range(10)]\nfor ci in cand:\n  if n.count(ci) >= 1:\n    print(\"Yes\")\n    return\nprint(\"No\")", "passed": true, "time": 0.14, "memory": 14160.0, "status": "done"}, {"code": "n = input()\n\nif n[0] == n[1] and n[1] == n[2]:\n    print('Yes')\nelif n[1] == n[2] and n[2] == n[3]:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.32, "memory": 14336.0, "status": "done"}, {"code": "a = input()\nif a[0] == a[1] == a[2] or a[1] == a[2] == a[3]:\n  print('Yes')\nelse:\n  print('No')", "passed": true, "time": 0.14, "memory": 14300.0, "status": "done"}, {"code": "\nN = str(input())\n\nif N[0] == N[1] and N[1] == N[2] :\n    print('Yes')\n\nelif N[1] == N[2] and N[2] == N[3]:\n    print('Yes')\n\nelse:\n    print('No')\n", "passed": true, "time": 0.14, "memory": 14324.0, "status": "done"}, {"code": "#!/usr/bin/env python3\n\ndef main():\n    a, b, c, d = input()\n    print((\"Yes\" if a == b == c or b == c == d else \"No\"))\n\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.14, "memory": 14196.0, "status": "done"}, {"code": "N = input()\ngood_ints = (str(i) * 3 for i in range(9 + 1))\nanswer = ''\n\nfor good_int in good_ints:\n    if good_int in N:\n        answer = 'Yes'\n        break\n        \nprint(answer if answer else 'No')", "passed": true, "time": 0.23, "memory": 14240.0, "status": "done"}, {"code": "# 4\u6841\u306e\u6570\u5b57\u30673\u3064\u4ee5\u4e0a\u9023\u7d9a\u3059\u308b\u304b\u5224\u5b9a\n\nN = list(input())\n# print(N)\n\nif N[0] == N[1] and N[0] == N[2]:\n    print('Yes')\nelif N[1] == N[2] and N[1] == N[3]:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.29, "memory": 14248.0, "status": "done"}, {"code": "#79\nn=list(input())\nif (n[0]==n[1]==n[2] or n[1]==n[2]==n[3]):\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.42, "memory": 14032.0, "status": "done"}, {"code": "N=input()\nif (N[0]==N[1] and N[1]==N[2]) or (N[1]==N[2] and N[2]==N[3]):\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "# ABC079A\nn = input()\nprint(\"Yes\" if n[0]==n[1]==n[2] or n[3]==n[1]==n[2] else \"No\")", "passed": true, "time": 0.15, "memory": 14088.0, "status": "done"}, {"code": "n=input()\n\nif n[0]==n[1]==n[2] or n[1]==n[2]==n[3]:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.19, "memory": 14060.0, "status": "done"}, {"code": "s = input()\nif (s[0]==s[1] and s[1]==s[2]) :\n  print(\"Yes\")\nelif (s[1]==s[2] and s[2]==s[3]) :\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.35, "memory": 14260.0, "status": "done"}, {"code": "N=input()\nj_count=0\nfor i in range(0,3):\n    if N[i]==N[i+1]:\n        j_count+=1\nif j_count>=2 and N[1]==N[2]:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.15, "memory": 14100.0, "status": "done"}, {"code": "n=int(input())\n\nif (n//10)%111==0 or (n%1000)%111==0:\n    ans=\"Yes\"\nelse:\n    ans=\"No\"\n\nprint(ans)", "passed": true, "time": 0.22, "memory": 14076.0, "status": "done"}, {"code": "N = input()\nif N[0] == N[1] == N[2] or N[1] == N[2] == N[3]:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.24, "memory": 14092.0, "status": "done"}, {"code": "integer = input()\nif integer[0] == integer[1] == integer[2] or integer[1] == integer[2] == integer[3]:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.15, "memory": 14192.0, "status": "done"}, {"code": "#\n# abc079 a\n#\nimport sys\nfrom io import StringIO\nimport unittest\n\n\nclass TestClass(unittest.TestCase):\n    def assertIO(self, input, output):\n        stdout, stdin = sys.stdout, sys.stdin\n        sys.stdout, sys.stdin = StringIO(), StringIO(input)\n        resolve()\n        sys.stdout.seek(0)\n        out = sys.stdout.read()[:-1]\n        sys.stdout, sys.stdin = stdout, stdin\n        self.assertEqual(out, output)\n\n    def test_\u5165\u529b\u4f8b_1(self):\n        input = \"\"\"1118\"\"\"\n        output = \"\"\"Yes\"\"\"\n        self.assertIO(input, output)\n\n    def test_\u5165\u529b\u4f8b_2(self):\n        input = \"\"\"7777\"\"\"\n        output = \"\"\"Yes\"\"\"\n        self.assertIO(input, output)\n\n    def test_\u5165\u529b\u4f8b_3(self):\n        input = \"\"\"1234\"\"\"\n        output = \"\"\"No\"\"\"\n        self.assertIO(input, output)\n\n\ndef resolve():\n    N = input()\n\n    if N[0] == N[1] == N[2] or N[1] == N[2] == N[3]:\n        print(\"Yes\")\n    else:\n        print(\"No\")\n\n\ndef __starting_point():\n    # unittest.main()\n    resolve()\n\n__starting_point()", "passed": true, "time": 0.23, "memory": 14576.0, "status": "done"}, {"code": "N = input()\nfor i in range(10):\n    if N.count(str(i)*3):\n        print('Yes')\n        return\nprint('No')\n", "passed": true, "time": 0.14, "memory": 14308.0, "status": "done"}, {"code": "a,b,c,d=input()\nprint((\"Yes\" if a==b==c or b==c==d else \"No\"))\n", "passed": true, "time": 0.15, "memory": 14320.0, "status": "done"}, {"code": "N = input()\n\no1 = set(N[0:3])\no2 = set(N[1:])\no3 = set(N)\n\n\nprint(\"Yes\" if len(o1) == 1 or len(o2) == 1 or len(o3) == 1 else \"No\")", "passed": true, "time": 0.15, "memory": 14224.0, "status": "done"}, {"code": "# \u6570\u5024\u306e\u53d6\u5f97\nN = str(input())\n\n# \u6570\u5024\u306e\u691c\u8a3c\nf_cnt = (N[:3]).count(N[:1])\nl_cnt = (N[1:]).count(N[3:])\nif f_cnt == 3\\\nor l_cnt == 3:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "import bisect,collections,copy,heapq,itertools,math,string\nimport sys\ndef I():\n    #1 line 1 int\n     return int(sys.stdin.readline().rstrip())\ndef LI():\n    #1 line n int\n     return list(map(int,sys.stdin.readline().rstrip().split()))\ndef S():\n    #1 line 1 string\n     return sys.stdin.readline().rstrip()\ndef LS():\n    #1 line n strings\n     return list(sys.stdin.readline().rstrip().split())\n\nA=S()\n\nif A[0] == A[1] == A[2] or A[1] == A[2] == A[3]:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.15, "memory": 14148.0, "status": "done"}, {"code": "a, b, c, d = input()\nprint(\"Yes\" if a==b==c or b==c==d else \"No\")", "passed": true, "time": 0.14, "memory": 14252.0, "status": "done"}, {"code": "S = input()\nans = False\nfor i in range(len(S)):\n  if S[1] == S[2] == S[3] or S[0] == S[1] == S[2]:\n    ans = True\nif ans:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14176.0, "status": "done"}, {"code": "n = input().rstrip()\nprint(['No', 'Yes'][int(len(set(n[:3])) == 1 or len(set(n[1:])) == 1)])", "passed": true, "time": 0.14, "memory": 14356.0, "status": "done"}, {"code": "n = input()\nif n[1] == n[2]:\n    if n[0]==n[1] or n[2]==n[3]:\n        print(\"Yes\")\n    else:\n        print(\"No\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14244.0, "status": "done"}, {"code": "n=input()\na=[]\nfor i in range(len(n)):\n    a.append(n[i])\n\nif (a[0]==a[1]) & (a[1]==a[2]) or (a[3]==a[2]) and (a[2]==a[1]) :\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.14, "memory": 14200.0, "status": "done"}, {"code": "# A - Good Integer\n#  \u6a19\u6e96\u5165\u529bN\n\nN = input()\nmy_list = []\nj = 0\n\nfor i in N:\n    my_list.append(i)\n\nif my_list[0] == my_list[1] == my_list[2] or my_list[1] == my_list[2] == my_list[3]:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.14, "memory": 14304.0, "status": "done"}, {"code": "n = input()\narr = []\nfor i in range(10):\n    s = \"\"\n    for j in range(3):\n        s += str(i)\n    arr.append(s)\n\nif n[0:3] in arr or n[1:4] in arr:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14204.0, "status": "done"}, {"code": "N = input()\n\nif N[0] == N[1] == N[2] or N[1] == N[2] == N[3]:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14280.0, "status": "done"}, {"code": "'''\n\u554f\u984c\uff1a\n    1118 \u306e\u3088\u3046\u306a\u30013 \u3064\u4ee5\u4e0a\u306e\u540c\u3058\u6570\u5b57\u304c\u9023\u7d9a\u3057\u3066\u4e26\u3093\u3060\n    4 \u6841\u306e\u6574\u6570\u3092 \u826f\u3044\u6574\u6570 \u3068\u3057\u307e\u3059\u3002\n\n    4 \u6841\u306e\u6574\u6570N \u304c\u4e0e\u3048\u3089\u308c\u308b\u306e\u3067\u3001N \u304c \u826f\u3044\u6574\u6570 \u304b\u3069\u3046\u304b\u3092\u7b54\u3048\u3066\u304f\u3060\u3055\u3044\u3002\n'''\n\n'''\n\u5236\u7d04\uff1a\n    1000 \u2266 N \u2266 9999\n    \u5165\u529b\u306f\u6574\u6570\u304b\u3089\u306a\u308b\n'''\n\n# \u6a19\u6e96\u5165\u529b\u304b\u3089 N \u3092\u53d6\u5f97\u3059\u308b\nn = int(input())\nlist_n = list(str(n))\n\nresult = \"\"\n\nif (list_n[0] == list_n[1]) and (list_n[1] == list_n[2]):\n    result = \"Yes\"\nelif (list_n[1] == list_n[2]) and (list_n[2] == list_n[3]):\n    result = \"Yes\"\nelse:\n    result = \"No\"\n\nprint(result)\n", "passed": true, "time": 0.14, "memory": 14304.0, "status": "done"}, {"code": "n=list(input())\nif n[0]==n[1]==n[2] or n[1]==n[2]==n[3]:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "n = int(input())\nn = str(n)\n# n\u306e\u4e8c\u6841\u76ee\u3068\u4e09\u6841\u76ee\u304c\u540c\u3058\u3067\u3001\u305d\u308c\u304c\u4e00\u6841\u76ee\u304b\u56db\u6841\u76ee\u304c\u3068\u540c\u3058\u306a\u3089Yes\nif n[1] == n[2]:\n    if n[0] == n[1] or n[2] == n[3]:\n        print(\"Yes\")\n    else:\n        print(\"No\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14264.0, "status": "done"}, {"code": "N = input()\ngood_ints = (str(i) * 3 for i in range(9 + 1))\n\nfor good_int in good_ints:\n    if good_int in N:\n        print('Yes')\n        return\n\nprint('No')", "passed": true, "time": 0.14, "memory": 14076.0, "status": "done"}, {"code": "N = input()\nif N[0] == N[1] == N[2] or N[1] == N[2] == N[3]:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14300.0, "status": "done"}, {"code": "N = input()\n\n# 3\u3064\u4ee5\u4e0a\u306e\u540c\u3058\u6570\u5b57\u304c\u9023\u7d9a\u3057\u3066\u4e26\u3093\u3060 4\u6841\u306e\u6574\u6570\u3092 \u826f\u3044\u6574\u6570 \u3068\u3057\u307e\u3059\u3002\n# N \u304c\u826f\u3044\u6574\u6570 \u306a\u3089\u3070 Yes \u3092\u3001\u305d\u3046\u3067\u306a\u3051\u308c\u3070 No \u3092\u51fa\u529b\u305b\u3088\u3002\n\nif N[1] == N[2]:\n    if N[0] == N[1] or N[2] == N[3]:\n        print(\"Yes\")\n    else:\n        print(\"No\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.18, "memory": 14296.0, "status": "done"}, {"code": "# coding = SJIS\n\nn = str(input())\n\nif n[0] == n[1] and n[1] == n[2]:\n    print(\"Yes\")\nelif n[1] == n[2] and n[2] == n[3]:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14292.0, "status": "done"}, {"code": "n = input()\n\nif n[0] == n[1] and n[1] == n[2] or n[1] == n[2] and n[2] == n[3]:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.14, "memory": 14304.0, "status": "done"}, {"code": "N = input()\n\nfor i in range(2):\n   if N[i:i+3] == 3 * N[i]:\n      print('Yes')\n      return\n\nprint('No')", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "a=input()\nb=set(a[:-1]);c=set(a[1:])\n\nif len(b)==1 or len(c)==1:\n  print('Yes')\nelse:\n  print('No')\n", "passed": true, "time": 0.14, "memory": 14140.0, "status": "done"}, {"code": "S = input()\nprint('Yes' if S[0] == S[1] == S[2] or S[1] == S[2] == S[3] else 'No')", "passed": true, "time": 0.14, "memory": 14264.0, "status": "done"}, {"code": "N = input('')\nif N[0] == N[1] == N[2] or N[1] == N[2] == N[3]:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14224.0, "status": "done"}, {"code": "n = list(input())\n\nif n[0] == n[1] and n[1] == n[2]:\n    print('Yes')\nelif n[1] == n[2] and n[2] == n[3]:\n    print('Yes')\nelif n[0] == n[1] == n[2] == n[3]:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14180.0, "status": "done"}]