ZhenlongDai/ACPR huggingface dataset:
Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
if int(N[1:4]) % 111 == 0 or int(N[2:5]) % 111 == 0:
  print("Yes")
else:
  print("No")

Failing test case input:
1118

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
N = input()
if int(N[0:3]) % 111 == 0 or int(N[1:4]) % 111 == 0:
  print("Yes")
else:
  print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=input()
print("Yes" if n[1]==n[2] and n.count(n[1])==3 else "No")

Failing test case input:
7777

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
n=input()
print("Yes" if n[1]==n[2] and n.count(n[1])>=3 else "No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()
if n[1] == n[2]:
  print('Yes')
else:
  print('No')

Failing test case input:
4552

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = input()
if n[1] == n[2] and (n[0] == n[2] or n[3] == n[2] ):
  print('Yes')
else:
  print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
n=1
p=-1
for i in range(4):
    t= N % 10
    if p == t:
        n = n + 1
    p=t
    N = int(N / 10)
ans = "YES" if n >= 3 else "NO"
ans

Failing test case input:
3550

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
N = int(input())
n=1
p=-1
for i in range(4):
    t= N % 10
    if p == t:
        n = n + 1
        if n == 3: break
    else:
        n = 1
    p=t
    N = int(N / 10)
ans = "Yes" if n == 3 else "No"
print(ans)

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin

def main():
    n = stdin.readline()
    ans = 0
    count = 0

    for i in range(len(n)):
        ans = i
        if ans == i:
            count += 1
    
    if count >= 3:
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

Failing test case input:
3716

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
from sys import stdin

def main():
    n = stdin.readline()
    if(n[0] == n[1] and n[1] == n[2]):
        print("Yes")
    elif(n[1] == n[2] and n[2] == n[3]):
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

integer = list(map(int, str(input())))

for i in range(10):
  if integer[0:2] == [i, i, i] or integer[1:3] == [i, i, i]:
    print("Yes")
    sys.exit()

print("No")


Failing test case input:
1118

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
import sys

integer = list(map(int, str(input())))

for i in range(10):
  if integer[0:3] == [i, i, i] or integer[1:4] == [i, i, i] or integer[0:4] == [i, i, i, i]:
    print("Yes")
    sys.exit()

print("No")
Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


str = input()

if int(str[0:2]) % 111 == 0:
	print("Yes")
elif int(str[1:3]) % 111 == 0:
	print("Yes")
print("No")	


Failing test case input:
1118

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):


str = input()
if int(str[0:3]) % 111 == 0:
	print("Yes")
elif int(str[1:4]) % 111 == 0:
	print("Yes")
else:
	print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
a = list(N[:3])
b = list(N[1:4])
if set(a) == 1 or set(b) == 1:
    print("Yes")
else:
    print("No")


Failing test case input:
1118

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
N = input()
a = list(N[:3])
b = list(N[1:4])
if len(set(a)) == 1 or len(set(b)) == 1:
    print("Yes")
else:
    print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()
print('YES' if n[0]==n[1]==n[2] or n[1]==n[2]==n[3] else 'NO')

Failing test case input:
3482

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n=input()
print("Yes" if n[0]==n[1]==n[2] or n[1]==n[2]==n[3] else "No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()


ans = s[0]
count = 0
for i in s:
  if i == ans:
    count += 1
  else:
    count = 1
  ans = i
if count <= 2:
  print("No")
else:
  print("Yes")




Failing test case input:
1118

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
s = input()


ans = s[0]
count = 0
for i in s:
  if i == ans:
    count += 1
    if count == 3:
      print("Yes")
      break
  else:
    count = 1
  ans = i
if count <= 2:
  print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int, input()))

if a[1] == a[2]:
    print("Yes")
else:
    print("no")


Failing test case input:
7435

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
a = list(map(int, input()))
 
if a[1] == a[2] and (a[1] == a[0] or a[1] == a[3]):
    print("Yes")
else:
    print("No")

Problem: p03543
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()
for i in range(2):
    if len(set(n[i:i+2])) == 1:
        print("Yes")
        break
else:
    print("No")

Failing test case input:
2216

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = input()
for i in range(2):
    if len(set(n[i:i+3])) == 1:
        print("Yes")
        break
else:
    print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=list(input())
print('YES' if s[0]==s[1]==s[2] or s[1]==[2]==s[3] else 'NO')

Failing test case input:
742

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
s=list(input())
print('Yes' if s[0]==s[1]==s[2] or s[1]==s[2]==s[3] else 'No')
Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
l=list(input())
print("Yes" if len(set(l))<=2 and len(set(l[:3]))==1 or len(set(l[1:])) else "No")

Failing test case input:
12733

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
l=list(input())
print("Yes" if len(set(l))<=2 and len(set(l[:3]))==1 or len(set(l[1:]))==1 else "No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = str(input())
if N[1] == N[2]:
  if N[0] == N[1] or N[2] == N[3]:
    print("Yes")
else:
  print("No")

Failing test case input:
8004

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
N  = str(input())
if N[0] == N[1] and N[1] == N[2]:
  print("Yes")
elif N[1] == N[2] and N[2] == N[3]:
  print("Yes")
else:
  print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()

if N[0] == N[1] == N[2] or N[1] == N[2] == N[2]:
    print('Yes')
else:
    print('No')

Failing test case input:
8004

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = input()

if N[0] == N[1] == N[2] or N[1] == N[2] == N[3]:
    print('Yes')
else:
    print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())

b = int(a / 10)
c = a % 1000

func = lambda x: (x % 111 == 0)

if func(b) or func(c):
    print("YES")
else:
    print("NO")


Failing test case input:
2370

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
a = int(input())

b = int(a / 10)
c = a % 1000

func = lambda x: (x % 111 == 0)

if func(b) or func(c):
    print("Yes")
else:
    print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):







b =str( input())

a = list(b)



if b[0]==b[1]:
  if b[1]==b[2]:
    print("Yes")
  else :
    print("No")

elif b[1]==b[2]:
  if b[2]==b[3]:
    print("Yes")
  else :
    print("No")












Failing test case input:
2190

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):







b =str( input())

a = list(b)



if b[0]==b[1]:
  if b[1]==b[2]:
    print("Yes")
  else :
    print("No")

elif b[1]==b[2]:
  if b[2]==b[3]:
    print("Yes")
  else :
    print("No")
else:
  print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()

if N[1] == N[2] and (N[0] == N[1] or N[2] == N[3]):
    print( 'Yes' )
else:
    print( 'Yes' ) 

Failing test case input:
6372

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = input()

if N[1] == N[2] and (N[0] == N[1] or N[2] == N[3]):
    print( 'Yes' )
else:
    print( 'No' )

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = str(input())

N1 = set(N)

if (len(N1) == 2) and N[1] == N[2]:
  print("Yes")
  
else:
  print("No")
  
  

Failing test case input:
7777

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
N = str(input())



if (N[1] == N[2] == N[0]) or(N[1] == N[2] == N[3]):
  print("Yes")
  
else:
  print("No")
Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=input()
if N.count(N[0])==4 or N[0]==N[1]==N[2] or N[1]==N[2]==N[3]:
    print("YES")
else:
    print("NO")

Failing test case input:
1234

Expected output:
No

Actual output:
NO


Fixed submission (verdict: Accepted):
N=input()
if N.count(N[0])==4 or N[0]==N[1]==N[2] or N[1]==N[2]==N[3]:
    print("Yes")
else:
    print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = list(input())
if len(set(n))==1:
    print('Yes')
elif n[0]==n[1] and n[1]==n[2]:
    print('Yes')
elif n[1]==n[2] and n[1]==n[2]:
    print('Yes')
else:
    print('No')

Failing test case input:
1887

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = list(input())
if n[0]==n[1] and n[1]==n[2]:
    print('Yes')
elif n[1]==n[2] and n[2]==n[3]:
    print('Yes')
else:
    print('No')

Problem: p03543
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = list(input())
list01 = list(set(n[0:2]))
list02 = list(set(n[1:3]))
if len(list01) == 1 or len(list02) == 1:
    print('Yes')
else:
    print('No')

Failing test case input:
3362

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = list(input())
list01 = list(set(n[0:3]))
list02 = list(set(n[1:4]))
if len(list01) == 1 or len(list02) == 1:
    print('Yes')
else:
    print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=input()
if N[1]==N[2]:
  if N[0]==N[1] or N[1]==N[3]:
    print("Yes")
else:
  print("No")

Failing test case input:
4552

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
N=input()
if N[0]==N[1]==N[2] or N[1]==N[2]==N[3]:
  print("Yes")
else:
  print("No")

Problem: p03543
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = input()
for i in range(1,9+1):
    if N.count(str(i)*3):
        print('Yes')
    else:
        exit()
print('No')

Failing test case input:
24549

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
N = input()
for i in range(10):
    if N.count(str(i)*3):
        print('Yes')
        exit()
print('No')

Problem: p03543
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = str(input())

if N[0] == N[1] and N[1] == N[2] and N[2] == N[3]:
    print('Yes')
else:
    print('No')

Failing test case input:
1118

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
N = str(input())

if N[0] == N[1] == N[2]:
    print('Yes')
elif N[1] == N[2] == N[3]:
    print('Yes')
else:
    print('No')
Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin

s = stdin.readline().rstrip()

ma = 0
point = 1
for i in range(len(s)-1):
    if s[i] == s[i+1]:
        point += 1
    else:
        ma = max(point,ma)
        point = 1

ma = max(point,ma)
if ma <= 2:
    print("Nn")
else:
    print("Yes")


Failing test case input:
2603

Expected output:
No


Actual output:
Nn


Fixed submission (verdict: Accepted):
from sys import stdin

s = stdin.readline().rstrip()

ma = 0
point = 1
for i in range(len(s)-1):
    if s[i] == s[i+1]:
        point += 1
    else:
        ma = max(point,ma)
        point = 1

ma = max(point,ma)
if ma <= 2:
    print("No")
else:
    print("Yes")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=input()
list=[a for a in N]
if list.count(list[0])==3 or list.count(list[1])==3:
    print('Yes')
else:
    print('No')
    

Failing test case input:
7777

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
N=input()
list=[a for a in N]
if list[0]==list[1]==list[2] or list[1]==list[2]==list[3]:
    print('Yes')
else:
    print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
flag = 0
if N[0] == N[1] and N[0] == N[2]:
  flag = 1
elif N[1] == N[2] and N[1] == N[3]:
  flag = 1
  
if flag == 1:
  print('YES')
else:
  print('NO')


Failing test case input:
1394

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
N = input()
flag = 0
if N[0] == N[1] and N[0] == N[2]:
  flag = 1
elif N[1] == N[2] and N[1] == N[3]:
  flag = 1
  
if flag == 1:
  print('Yes')
else:
  print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
if(s[0] == s[1]):
    if(s[1] == s[2]):
        print("Yes")
        exit
if(s[1] == s[2]):
    if(s[2] == s[3]):
        print("Yes")
        exit
print("No")


Failing test case input:
1118

Expected output:
Yes

Actual output:
Yes
No


Fixed submission (verdict: Accepted):
s = input()
if(s[0] == s[1]):
    if(s[1] == s[2]):
        print("Yes")
        exit()
if(s[1] == s[2]):
    if(s[2] == s[3]):
        print("Yes")
        exit()
print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
if int(N[0:4]) % 111 == 0 or int(N[1:4]) % 111 == 0:
  print("Yes")
else:
  print("No")


Failing test case input:
1887

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = input()
if int(N[0:3]) % 111 == 0 or int(N[1:4]) % 111 == 0:
  print("Yes")
else:
  print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
	i = len(set(input()))
	if i < 3:
		print("Yes")
	else:
		print("No") 
	


if __name__ == "__main__": main()

Failing test case input:
535

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
def main():
	s = list(input())
	
	a = len(set(s[:3]))
	b = len(set(s[1:4]))
	if a==1 or b==1:
		print("Yes")
	else:
		print("No")


if __name__ == "__main__": main()
Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()

if n[1] != n[2]:
  print("No")
else:
  if n[0] == n[1] or n[-1] == n[1]:
    print("Yes")

Failing test case input:
4552

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
n = input()

if n[1] != n[2]:
  print("No")
else:
  if n[0] == n[1] or n[-1] == n[1]:
    print("Yes")
  else:
    print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
num = "0"
count = 1
for i in N:
	if (num == i):
		count += 1
	elif count > 2:
		break
	else:
		count = 1
	num = i
	print(num, count)
if count > 2:
	print("yes")

Failing test case input:
2635

Expected output:
No


Actual output:
2 1
6 1
3 1
5 1


Fixed submission (verdict: Accepted):
N = input()
num = "0"
count = 1
for i in N:
	if (num == i):
		count += 1
	elif count > 2:
		break
	else:
		count = 1
	num = i

if count > 2:
	print("Yes")
else:
	print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=input()
count = 0
for i in range(0,2):
    if n[i] == n[i+1]:
        count = count + 1
        print(count)
if count >= 2:
    print("Yes")
else:print("No")


Failing test case input:
4552

Expected output:
No


Actual output:
1
No


Fixed submission (verdict: Accepted):
n=input()
count = 0
for i in range(0,2):
    if n[i] == n[i+1] == n[i+2]:
        count = count + 1
if count >= 1:
    print("Yes")
else:print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


def main():
    l = [e for e in input()]
    cnt = 0
    last = ''
    for c in l:
        print(c, last)
        if c == last:
            cnt+=1
        else:
            cnt = 0
        if cnt == 2:
            print("Yes")
            break
        last = c
    else:
        print("No")

main()


Failing test case input:
2324

Expected output:
No


Actual output:
2 
3 2
2 3
4 2
No


Fixed submission (verdict: Accepted):


def main():
    l = [e for e in input()]
    cnt = 0
    last = ''
    for c in l:
        if c == last:
            cnt+=1
        else:
            cnt = 0
        if cnt == 2:
            print("Yes")
            break
        last = c
    else:
        print("No")

main()

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()
print("YES" if n[0]==n[1]==n[2] or n[1]==n[2]==n[3] else "NO")

Failing test case input:
1858

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n=input()
print("Yes" if n[0]==n[1]==n[2] or n[1]==n[2]==n[3] else "No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = str(input())

N1 = set(N)

if (len(N1) < 3) and (N[1] == N[2]) and (N[0] != N[3]):
  print("Yes")
  
else:
  print("No")
  


Failing test case input:
7777

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
N = str(input())



if (N[1] == N[2] == N[0]) or(N[1] == N[2] == N[3]):
  print("Yes")
  
else:
  print("No")
Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

n = input()
cue = 0
if n[1] == n[2]:
    if n[0] == n[1] or n[1] == n[2]:
        cue = 1

if cue == 1:
    print('Yes')
else:
    print('No')

Failing test case input:
4552

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = input()
cue = 0
if n[1] == n[2]:
    if n[0] == n[1] or n[3] == n[2]:
        cue = 1

if cue == 1:
    print('Yes')
else:
    print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
cnt=0
last=-1
while N>0:
  N,n=divmod(N,10)
  if last == n:
    cnt+=1
    if cnt>=3:
      break
  else:
    cnt=1
  last=n
if cnt>=3:
  print('yes')
else:
  print('no')

Failing test case input:
232

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
N=int(input())
cnt=0
last=-1
while N>0:
  N,n=divmod(N,10)
  if last == n:
    cnt+=1
    if cnt>=3:
      break
  else:
    cnt=1
  last=n
if cnt>=3:
  print('Yes')
else:
  print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
print("YES" if s[0]==s[1]==s[2] or s[1]==s[2]==s[3] else "NO")

Failing test case input:
2635

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
s=input()
print("Yes" if s[0]==s[1]==s[2] or s[1]==s[2]==s[3] else "No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

integer = list(map(int, str(input())))

for i in range(10):
  if integer[0:2] == [i, i, i] or integer[1:3] == [i, i, i] or integer[0:3] == [i, i, i, i]:
    print("Yes")
    sys.exit()

print("No")


Failing test case input:
7777

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
import sys

integer = list(map(int, str(input())))

for i in range(10):
  if integer[0:3] == [i, i, i] or integer[1:4] == [i, i, i] or integer[0:4] == [i, i, i, i]:
    print("Yes")
    sys.exit()

print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = list(str(input()))

pre = ''
num = 0
for n in N:
  if pre == n:
    num +=1
    if num >=3:
      break
  else:
    num = 0
    pre = n
if num >=3:
  print("Yes")
else:
  print("No")

Failing test case input:
1118

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
N = list(str(input()))

pre = ''
num = 1
for n in N:
  if pre == n:
    num +=1
    if num >=3:
      break
  else:
    num = 1
    pre = n
if num >=3:
  print("Yes")
else:
  print("No")
Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin

s = stdin.readline().rstrip()

ma = 0
point = 1
for i in range(len(s)-1):
    if s[i] == s[i+1]:
        point += 1
    else:
        ma = max(point,ma)
        point = 1
if ma <= 2:
    print("Nn")
else:
    print("Yes")

Failing test case input:
2603

Expected output:
No


Actual output:
Nn


Fixed submission (verdict: Accepted):
from sys import stdin

s = stdin.readline().rstrip()

ma = 0
point = 1
for i in range(len(s)-1):
    if s[i] == s[i+1]:
        point += 1
    else:
        ma = max(point,ma)
        point = 1

ma = max(point,ma)
if ma <= 2:
    print("No")
else:
    print("Yes")

Problem: p03543
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x=list(input())
for i in range(10):
  if x.count(i)>=3:
    print("Yes")
    break
else:
  print("No")

Failing test case input:
7777

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
x=list(input())
for i in range(10):
  if x.count(str(i))>=3 and x[1]==x[2]: 
    print("Yes")
    break
else:
  print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()

for i in range(len(s)-2):
  if s[i]==s[i+1] and s[i]==s[i+2]:
    print("Yes")
    break
  else:
    print("No")

Failing test case input:
3051

Expected output:
No


Actual output:
No
No


Fixed submission (verdict: Accepted):
s = input()

for i in range(len(s)-2):
  if s[i]==s[i+1] and s[i]==s[i+2]:
    ans="Yes"
    break
  else:
    ans="No"
print(ans)

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x=input()
if x[1] != x[2]:
  print("No")
elif x[0] == x[2]:
  print("Yes")
elif x[1] == x[3]:
  print("Yes")

Failing test case input:
2116

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
x=input()
if x[1] != x[2]:
  print("No")
elif x[0] == x[2]:
  print("Yes")
elif x[1] == x[3]:
  print("Yes")
else:
  print("No")

Problem: p03543
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = input()
if sum(n[1]==n[2]==a for a in n) >= 2:
    print('Yes')
else:
    print('No')


Failing test case input:
2116

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = input()
if sum(n[1]==n[2]==a for a in n) >= 3:
    print('Yes')
else:
    print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=input();print('Yes')if set(N[:3])==1or set(N[1:])==1else print('No')

Failing test case input:
7777

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
N=input();print('Yes')if len(set(N[:3]))==1or len(set(N[1:]))==1else print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = str(input(()))

if n[0] == n[1] == n[2] or n[1] == n[2] == n[3]:
    print("Yes")
else:
    print("No") 

Failing test case input:
8816

Expected output:
No


Actual output:
()No


Fixed submission (verdict: Accepted):
n = str(input())

if n[0] == n[1] == n[2] or n[1] == n[2] == n[3]:
    print("Yes")
else:
    print("No")
Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()

if n[0] == n[1] == n[2] == n[3]:
    print('Yes')
else:
    print('No')


Failing test case input:
1118

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
n = input()

if n[0] == n[1] == n[2] or n[1] == n[2] == n[3]:
    print('Yes')
else:
    print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=input()
ans=1
for i in range(len(N)-1):
  if N[i] == N[i+1]:
    ans+=1
  else:
    ans=1
if ans>=3: print("Yes")
else: print("No")

Failing test case input:
1118

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
N=input()
ans=1
for i in range(len(N)-1):
  if N[i] == N[i+1]:
    ans+=1
  else:
    ans=1
  if ans>=3: 
    print("Yes")
    exit()
print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()

if len(set(list(N[0:2]))) == 1 or len(set(list(N[1:3]))) == 1:
    print('Yes')
else:
    print('No')


Failing test case input:
2116

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = input()

if len(set(N[0:3])) == 1 or len(set(N[1:4])) == 1:
    print('Yes')
else:
    print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

x=input(int)
x=str(x)

if x[0]==x[1]:
    if x[1]==x[2]:
        print("Yes")
    elif x[1]!=x[2]:
        print("No")
elif x[0]!=x[1]:
    if x[1]==x[2]:
        if x[2]==x[3]:
            print("Yes")
        elif x[2]!=x[3]:
            print("No")
    elif x[1]!=x[2]:
        print("No")
    
    

Failing test case input:
6680

Expected output:
No


Actual output:
<class 'int'>No


Fixed submission (verdict: Accepted):

x=str(input())

if x[0]==x[1]:
    if x[1]==x[2]:
        print("Yes")
    elif x[1]!=x[2]:
        print("No")
elif x[0]!=x[1]:
    if x[1]==x[2]:
        if x[2]==x[3]:
            print("Yes")
        elif x[2]!=x[3]:
            print("No")
    elif x[1]!=x[2]:
        print("No")

Problem: p03543
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
input = sys.stdin.readline
N = list(input())[: -1]
r = 1
for i in range(len(N) - 1):
  if N[i] == N[i + 1]:
    r += 1
  else: r = 1
if r >= 3: print("Yes")
else: print("No")

Failing test case input:
1118

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline
N = list(input())[: -1]
r = 1
for i in range(len(N) - 1):
  if N[i] == N[i + 1]:
    r += 1
  elif i != 2: r = 1
if r >= 3: print("Yes")
else: print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
res = S[0]
ans = 0
for i in range(1,len(S)):
  if S[i] == res:
    ans += 1
    res = S[i]
  else:
    ans = 0
    res = S[i]
if ans == 3:
  print('Yes')
else:
  print('No')

Failing test case input:
1118

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
S = input()
res = S[0]
ans = 1
for i in range(1,len(S)):
  if S[i] == res:
    ans += 1
    res = S[i]
    if ans == 3:
      print('Yes')
      exit()
  else:
    ans = 1
    res = S[i]

print('No')
Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = list(input())

if(len(set(N)) <=2):
    print("Yes")
else:
    print("No")

Failing test case input:
535

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = list(input())

if(len(set(N)) <=2 and (N[0]==N[1]==N[2] or N[1]==N[2]==N[3])):
    print("Yes")
else:
    print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()

if n[0].count(n) >= 3 or n[1].count(n) >= 3:
    print('Yes')
else:
    print('No')
    

Failing test case input:
1118

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
n = input()

if n[0] == n[1] == n[2] or n[1] == n[2] == n[3]:
    print('Yes')
else:
    print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num = input()

if num[:3].count(num[0])==3 or num[1:].count(num[1]):
  print("Yes")
else: print("No")

Failing test case input:
1394

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
num = input()
if num[:3].count(num[0])==3 or num[1:].count(num[1])==3:
  print("Yes")
else: print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
num = "0"
count = 1
for i in N:
	if (num == i):
		count += 1
	elif count > 2:
		break
	else:
		count = 1
	num = i
	print(num, count)
if count > 2:
	print("Yes")
else:
	print("No")

Failing test case input:
1233

Expected output:
No


Actual output:
1 1
2 1
3 1
3 2
No


Fixed submission (verdict: Accepted):
N = input()
num = "0"
count = 1
for i in N:
	if (num == i):
		count += 1
	elif count > 2:
		break
	else:
		count = 1
	num = i

if count > 2:
	print("Yes")
else:
	print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


a = list(input())

if a[0] == a[1] and a[1] == a[2] or a[1] == a[2] and a[2] == a[3]:
    print("YES")
else:
    print("NO")





Failing test case input:
756

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):


a = list(input())

if a[0] == a[1] and a[1] == a[2] or a[1] == a[2] and a[2] == a[3]:
    print("Yes")
else:
    print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
n=1
p=-1
for i in range(4):
    t= N % 10
    if p == t:
        n = n + 1
    p=t
    N = int(N / 10)
ans = "YES" if n >= 3 else "NO"
print(ans)

Failing test case input:
16730

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
N = int(input())
n=1
p=-1
for i in range(4):
    t= N % 10
    if p == t:
        n = n + 1
        if n == 3: break
    else:
        n = 1
    p=t
    N = int(N / 10)
ans = "Yes" if n == 3 else "No"
print(ans)

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()
for i in range(4):
  if n[1] != n[2]:
    print("No")
    break
  else:
    if n[0] == n[1] or n[-1] == n[1]:
      print("Yes")

Failing test case input:
4552

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
n = input()

if n[1] != n[2]:
  print("No")
else:
  if n[0] == n[1] or n[-1] == n[1]:
    print("Yes")
  else:
    print("No")
Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=input();print('NYoe s'[len(set(n))==1 or (len(set(n))==2 and n[1]==n[2] and n[0]!=n[2])::2])

Failing test case input:
1118

Expected output:
Yes

Actual output:
No 


Fixed submission (verdict: Accepted):
n=input();print('NYoe s'[len(set(n))==1 or (len(set(n))==2 and n[1]==n[2] and n[0]!=n[3])::2])

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=list(input())
print("YES" if n[0]==n[1]==n[2] else "YES" if n[1]==n[2]==n[3] else "NO")

Failing test case input:
8004

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n=list(input())
print("Yes" if n[0]==n[1]==n[2] else "Yes" if n[1]==n[2]==n[3] else "No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()
count = 0
for i, char in enumerate(n):
    if i == 0:
        continue
    if n[i-1] == char:
        count += 1
    else:
        count = 0

ans = 'Yes' if count >= 3 else 'No'
print(ans)


Failing test case input:
1118

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
n = input()
count = 1
max_c = - float('inf')
for i, char in enumerate(n):
    if i == 0:
        continue
    if n[i-1] == char:
        count += 1 
    else:
        count = 1
    max_c = max(max_c, count)
 
ans = 'Yes' if max_c >= 3 else 'No'
print(ans)

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
if 1 in [len(set(s[:2])),len(set(s[-3:]))]:
    print('Yes')
else:
    print('No')

Failing test case input:
6680

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = input()
if 1 in [len(set(s[:3])),len(set(s[-3:]))]:
    print('Yes')
else:
    print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=input()
if N[0]==N[1] and N[1]==N[2]:
	print("yes")
elif N[1]==N[2] and N[2]==N[3]:
	print("Yes")
else:
	print("No")

Failing test case input:
7777

Expected output:
Yes

Actual output:
yes


Fixed submission (verdict: Accepted):
N=input()
if N[0]==N[1] and N[1]==N[2]:
	print("Yes")
elif N[1]==N[2] and N[2]==N[3]:
	print("Yes")
else:
	print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


str = input()
if int(str[0:3]) % 111 == 0:
	print("Yes")
elif int(str[1:4]) % 111 == 0:
	print("Yes")
print("No")	



Failing test case input:
1118

Expected output:
Yes

Actual output:
Yes
No


Fixed submission (verdict: Accepted):


str = input()
if int(str[0:3]) % 111 == 0:
	print("Yes")
elif int(str[1:4]) % 111 == 0:
	print("Yes")
else:
	print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
if (s[0]==s[1] and s[1]==s[2]) and (s[1]==s[2] and s[2]==s[3]):
    print("Yes")
else:
    print("No")

Failing test case input:
1118

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
s = input()
if (s[0]==s[1] and s[1]==s[2]) or (s[1]==s[2] and s[2]==s[3]):
    print("Yes")
else:
    print("No")
Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=input()
if n[0]==n[1]==n[2] or n[1]==n[1]==n[2]:
  print("Yes")
else:
  print("No")

Failing test case input:
1887

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n=input()
if n[0]==n[1]==n[2] or n[1]==n[2]==n[3]:
  print("Yes")
else:
  print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()
s1 = n[:2]
s2 = n[1:]
if len(set(s1)) == 1 or len(set(s2)) == 1:
  print('Yes')
else:
  print('No')

Failing test case input:
8816

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = input()
s1 = n[:3]
s2 = n[1:]
if len(set(s1)) == 1 or len(set(s2)) == 1:
  print('Yes')
else:
  print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()
if len(set(n)) >= 3:
  print('Yes')
else:
  print('No')

Failing test case input:
4552

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = input()
if len(set(s[1:])) == 1 or len(set(s[:3])) == 1:
  print('Yes')
else:
  print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

line = sys.stdin.readline().strip()



def is_good(x):
    for c in "123456789":
        return (c*3) in x
    return False

if is_good(line):
    print("Yes")
else:
    print("No")


Failing test case input:
7777

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
import sys

line = sys.stdin.readline().strip()



def is_good(x):
    for c in "1234567890":
        if (c*3) in x:
            return True
    return False

if is_good(line):
    print("Yes")
else:
    print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()


ans = s[0]
count = 0
for i in s:
  if i == ans:
    count += 1
  else:
    count = 0
  ans = i
if count <= 2:
  print("No")
else:
  print("Yes")



Failing test case input:
1118

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
s = input()


ans = s[0]
count = 0
for i in s:
  if i == ans:
    count += 1
    if count == 3:
      print("Yes")
      break
  else:
    count = 1
  ans = i
if count <= 2:
  print("No")

Problem: p03543
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = list(input())
s = [int(i) for i in n]

print(['No','Yes'][sum(s[:3])%3 == 0 or sum(s[1:4])%3 == 0 or sum(s)%4 == 0])

Failing test case input:
475

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = list(input())
s = [int(i) for i in n]

print(['No','Yes'][len(set(s[:3]))==1 or len(set(s[1:4]))==1 or len(set(s[1:4])) == 1])
Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

integer = list(map(int, str(input())))


print(integer)
for i in range(10):
  if integer.count(i) >= 3:
    print("Yes")
    sys.exit()

print("No")


Failing test case input:
3753

Expected output:
No


Actual output:
[3, 7, 5, 3]
No


Fixed submission (verdict: Accepted):
import sys

integer = list(map(int, str(input())))

for i in range(10):
  if integer[0:3] == [i, i, i] or integer[1:4] == [i, i, i] or integer[0:4] == [i, i, i, i]:
    print("Yes")
    sys.exit()

print("No")

Problem: p03543
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = input()
s1 = N[1:len(N)]
s2 = N[0:len(N) - 1]
isOk = True
for i in range(1, len(N)-1):
    if s1[i] != s1[i - 1]:
        break
        isOk = False
    else:
        continue

if isOk:
    print('Yes')
    exit(0)

isOk = True
for i in range(1, len(N)-1):
    if s2[i] != s2[i - 1]:
        break
    else:
        continue

if isOk:
    print('Yes')
else:
    print('No')


Failing test case input:
2324

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = input()
s1 = N[1:len(N)]
s2 = N[0:len(N) - 1]
isOk = True
for i in range(1, len(N)-1):
    if s1[i] != s1[i - 1]:
        isOk = False
        break
    else:
        continue

if isOk:
    print('Yes')
    exit(0)

isOk = True
for i in range(1, len(N)-1):
    if s2[i] != s2[i - 1]:
        isOk = False
        break
    else:
        continue

if isOk:
    print('Yes')
else:
    print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

sys.setrecursionlimit(1000000)


def main():
    s = input()

    ls = ["111", "222", "333", "444", "555", "666", "777", "888", "999"]
    for x in ls:
        if x in ls:
            print("Yes")
            return
    print("No")


main()


Failing test case input:
1858

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import sys

sys.setrecursionlimit(1000000)


def main():
    s = input()

    ls = ["000", "111", "222", "333", "444", "555", "666", "777", "888", "999"]
    for x in ls:
        if x in s:
            print("Yes")
            return
    print("No")


main()

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = list(input())
print(N[0] == N[1] == N[2] or N[1] == N[2] == N[3])

Failing test case input:
308

Expected output:
No


Actual output:
False


Fixed submission (verdict: Accepted):
N = list(input())
print("Yes" if N[0] == N[1] == N[2] or N[1] == N[2] == N[3] else "No")
Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()
cnt = 1
valid = False

for a, b in zip(n[1:], n):
    if a != b:
        if cnt >= 3:
            valid = True
            break
        else:
            cnt = 1
    else:
        cnt += 1
if valid is True:
    print("Yes")
else:
    print("No")


Failing test case input:
7777

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
n = input()
cnt = 1
valid = False

for a, b in zip(n[1:], n):
    if a != b:
        if cnt >= 3:
            break
        else:
            cnt = 1
    else:
        cnt += 1
if cnt >= 3:
    valid = True
if valid is True:
    print("Yes")
else:
    print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import sys
M=input()
 
for i in range(10):
  if(M.find(str(i))!=-1):
    print("Yes")
    sys.exit()
print("No")


Failing test case input:
658

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import sys
M=input()
 
for i in range(10):
  if(M.find(str(i)*3)!=-1):
    print("Yes")
    sys.exit()
print("No")

Problem: p03543
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    a=input()
    b=set(a)
    if(len(b)<=2):
        if(a.count(b.pop())==2):
            print('No')
        else:
            print('Yes')
    else:
        print('No')

main()


Failing test case input:
535

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
def main():
    a=input()
    b=set(a)
    if(len(b)<=2):
        if(a.count(a[1],0,3)!=3 and a.count(a[2],1,4)!=3):
            print('No')
        else:
            print('Yes')
    else:
        print('No')

main()

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import sys

YES = "Yes"  
NO = "No"  


def solve(N: int):
    return YES if len(set(str(N))) <= 2 else NO



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    print(solve(N))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    
    main()


Failing test case input:
535

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

import sys

YES = "Yes"  
NO = "No"  


def solve(N: int):
    S = str(N)
    return YES if len(set(S[:3])) == 1 or len(set(S[1:])) == 1 else NO



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    print(solve(N))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    
    main()

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
print("Yes" if len(set(N[0:2])) == 1 or len(set(N[1:3]))==1 else "No")

Failing test case input:
1887

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = input()
print("Yes" if len(set(N[0:3])) == 1 or len(set(N[1:4]))==1 else "No")
Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num = list(map(int, input()))
if(num[0] == num[1] & num[0] == num[2]):
    print("Yes")
elif(num[1] == num[2] & num[2] == num[3]):
    print("Yes")
else:
    print("No")


Failing test case input:
232

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
num = list(map(int, input()))
if(num[0] == num[1] and num[0] == num[2]):
    print("Yes")
elif(num[1] == num[2] and num[2] == num[3]):
    print("Yes")
else:
    print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=input()
if N[1]==N[2]:
    if N[1]==N[0] or N[1]==N[3]:
        print('Yes')
else:print('No')

Failing test case input:
3550

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
N=input()
if N[1]==N[2]:
    if N[1]==N[0] or N[1]==N[3]:
        print('Yes')
    else:
        print('No')
else:print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import re

def solution(N):
    if (N < 1000 or N > 9999):
        print ("No")
        return  
    N_str = list(str(N))

    for i in range(0,3):
        if (N_str[i] == N_str[i+1]):
            continue
        if (N_str[i] != N_str[i+1] and i > 1):
            print ("No")
            exit()
    print ("Yes")
    return


if __name__ == '__main__':
    N = input()
    if re.match('^[0-9]{1,}$', N):
        solution(int(N))
    else:
        print ("No")
        exit()


Failing test case input:
1233

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import re

def solution(N):
    if (N < 1000 or N > 9999):
        print ("No")
        return  
    N_str = list(str(N))

    if (N_str[0] == N_str[1] == N_str[2]):
          print ("Yes")
          exit()
    if (N_str[3] == N_str[1] == N_str[2]):
          print ("Yes")
          exit()      
    print ("No")
    return


if __name__ == '__main__':
    N = input()
    if re.match('^[0-9]{1,}$', N):
        solution(int(N))
    else:
        print ("No")
        exit()

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
i = input()
if i[0]== i[-1]:
  print("Yes")
else:
  if i[1]==i[2] and i[2]==i[-1]:
    print("Yes")
  elif i[0]==i[1] and i[1]==i[2]:
    print("Yes")
  else:
    print("No")

Failing test case input:
535

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
i = input()
if i[1]==i[2] and i[2]==i[-1]:
  print("Yes")
elif i[0]==i[1] and i[1]==i[2]:
  print("Yes")
else:
  print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()

if len(set(N[0:2])) == 1 or len(set(N[1:3])) == 1:
    print('Yes')
else:
    print('No')

Failing test case input:
8816

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = input()

if len(set(N[0:3])) == 1 or len(set(N[1:4])) == 1:
    print('Yes')
else:
    print('No')
Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = map(str,input())
a = list(a)
c = False

for x in range(2):
  if a[x] == a[x+1]:
    if a[x+1] == a[x+2]:
      print("YES")
      c=True

if c == False:
  print("NO")

Failing test case input:
756

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
a = map(int,input())
a = list(a)

for x in range(2):
  if a[x] == a[x+1]:
    if a[x+1] == a[x+2]:
      print("Yes")
      exit()

print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A=input()
print('NYOE S'[(A[1]==A[2]) and 
(A[0]==A[1] or A[1]==A[3])
::2])

Failing test case input:
6234

Expected output:
No


Actual output:
NO 


Fixed submission (verdict: Accepted):
A=input()
print('NYoe s'[(A[1]==A[2]) and 
(A[0]==A[1] or A[1]==A[3])
::2])

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
n=list(str(n))
if (n[0]==n[1] and n[0]==n[1]) or (n[1]==n[2] and n[2]==n[3]):
  print("Yes")
else:
  print("No")


Failing test case input:
11694

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n=int(input())
n=list(str(n))
if (n[0]==n[1] and n[1]==n[2]) or (n[1]==n[2] and n[2]==n[3]):
  print("Yes")
else:
  print("No")

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
if N[0] == N[1] == N[2] == N[3] :
  print('Yes')
else:
  print('No')

Failing test case input:
1118

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
N = input()
if N[0] == N[1] == N[2]  :
  print('Yes')
elif N[1] == N[2] == N[3] :
  print('Yes') 
else:
  print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()

if n[0] and n[1] and n[2] or n[1] and n[2] and n[3]:
    print ("Yes")
else:
    print ("No")

Failing test case input:
6680

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = input()

if (n[0] == n[1] == n[2]) or (n[1] == n[2] == n[3]):
    print ("Yes")
else:
    print ("No")

Problem: p03543
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = list(input())
s = n[0:3]
e = n[1:4]
if len(set(s))==1 or len(set(e)):
	print('Yes')
else:
	print('No')

Failing test case input:
436

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = list(input())
s = n[0:3]
e = n[1:4]
if len(set(s))==1 or len(set(e))==1:
	print('Yes')
else:
	print('No')

Problem: p03543
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()

if int(n[1:]) % 111 == 0 or int(n[:-1]) % 111 == 0:
  print("Yes")
else:
  print("NO")

Failing test case input:
1887

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n = input()

if int(n[1:]) % 111 == 0 or int(n[:-1]) % 111 == 0:
  print("Yes")
else:
  print("No")