ZhenlongDai/ACPR huggingface dataset:
Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = [input().split() for i in range(3)]
b = []
for i in range(3):
  for j in range(2):
    b.append(a[i][j])
c = [int(b[i]) for i in range(6)]
for i in range(1, 4):
  if c.count(i) == 3:
    print('NO')
    exit()
print('YES')

Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
a = [input().split() for i in range(3)]
b = []
for i in range(3):
  for j in range(2):
    b.append(a[i][j])
c = [int(b[i]) for i in range(6)]
for i in range(1, 5):
  if c.count(i) == 3:
    print('NO')
    exit()
print('YES')

Problem: p03130
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
d=[0,0,0,0]
for i in range(3):
    a,b=map(int,input().split())
    d[a-1]+=1
    d[b-1]+=1

if d[0] <= 2 and d[1] <= 2 and d[2] <= 2 and d[3] <= 2:
    print("YES")
else:
    print("N0")
    


Failing test case input:
1 4
1 2
1 3

Expected output:
NO


Actual output:
N0


Fixed submission (verdict: Accepted):
d=[0,0,0,0]
for i in range(3):
    a,b=map(int,input().split())
    d[a-1]+=1
    d[b-1]+=1

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

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import deque
S = [list(map(int, input().split())) for _ in range(3)]
S.sort()
l=[0,0,0,0]

for i in range(3):
    for j in range(2):
        l[S[i][j]-1]+=1
print(l)
if max(l)==3:
    print("NO")
else:
    print("YES")

Failing test case input:
1 2
2 4
4 3

Expected output:
YES


Actual output:
[1, 2, 1, 2]
YES


Fixed submission (verdict: Accepted):
from collections import deque
S = [list(map(int, input().split())) for _ in range(3)]

l=[0,0,0,0]

for i in range(3):
    for j in range(2):
        l[S[i][j]-1]+=1

if max(l)==3:
    print("NO")
else:
    print("YES")

Problem: p03130
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import Counter
import sys
A = []
for i in range(3):
    a,b = map(int,input().split())
    A.append(a)
    A.append(b)
c = Counter(A)
for i in c.values():
    if i >=2:
        print('NO')
        sys.exit()
print('YES')

Failing test case input:
1 3
2 4
4 3

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
from collections import Counter
import sys
A = []
for i in range(3):
    a,b = map(int,input().split())
    A.append(a)
    A.append(b)
c = Counter(A)
for i in c.values():
    if i >=3:
        print('NO')
        sys.exit()
print('YES')

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p = []
for _ in range(3):
    p += list(map(int, input().split()))
for i in range(4):
    if p.count(i) >= 3:
        print('NO')
        exit(0)
print('YES')


Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
p = []
for _ in range(3):
    p += list(map(int, input().split()))
for i in range(1,4+1):
    if p.count(i) >= 3:
        print('NO')
        exit(0)
print('YES')
Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a1,b1 = map(int,input().split())
a2,b2 = map(int,input().split())
a3,b3 = map(int,input().split())

l = [a1,a2,a3,b1,b2,b3]
l.sort()

x = True

for i in range(4):
    if l[i] == l[i+1] == l[i+2]:
        x = False

print("YES" if x == True else "No")

Failing test case input:
2 4
1 3
3 3

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
a1,b1 = map(int,input().split())
a2,b2 = map(int,input().split())
a3,b3 = map(int,input().split())

l = [a1,a2,a3,b1,b2,b3]
l.sort()

x = True

for i in range(4):
    if (l[i] == l[i+1]) and (l[i] == l[i+2]):
        x = False
if x == True:
    print("YES")
else:
    print("NO")

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ll=list()
for i in range(3):
    a=input()
    b=a.split()
    ll.append(int(b[0]))
    ll.append(int(b[1]))
c1=ll.count(1)
c2=ll.count(2)
c3=ll.count(3)
c4=ll.count(4)
if c1>2 or c2>2 or c3>2 or c4>2:
    print("No")
else:
    print("Yes")


Failing test case input:
2 4
1 3
1 3

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
ll=list()
for i in range(3):
    a=input()
    b=a.split()
    ll.append(int(b[0]))
    ll.append(int(b[1]))
c1=ll.count(1)
c2=ll.count(2)
c3=ll.count(3)
c4=ll.count(4)
if c1>2 or c2>2 or c3>2 or c4>2:
    print("NO")
else:
    print("YES")

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a1, b1 = map(int, input().split())
a2, b2 = map(int, input().split())
a3, b3 = map(int, input().split())

l = [a1, a2, a3, b1, b2, b3]

res = [sum([1 for _ in l if _ == __]) for __ in [1,2,3,4]]

if 3 in res:
    print("No")
else:
    print("Yes")

Failing test case input:
1 3
1 2
4 3

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
a1, b1 = map(int, input().split())
a2, b2 = map(int, input().split())
a3, b3 = map(int, input().split())

l = [a1, a2, a3, b1, b2, b3]

res = [sum([1 for _ in l if _ == __]) for __ in [1,2,3,4]]

if 3 in res:
    print("NO")
else:
    print("YES")

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p_str = input().split()
p = [int(s) for s in p_str]
p_str = input().split()
p.extend([int(s) for s in p_str])
p.extend([int(s) for s in p_str])

count_list = []
for i in range(4):
   count =  p.count(i+1)
   count_list.append(count)


count_list2 = []





if(count_list.count(1)==2 and count_list.count(2)==2):
   print("YES")
else:
   print("NO")

Failing test case input:
1 4
2 3
3 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
p_str = input().split()
p = [int(s) for s in p_str]
p_str = input().split()
p.extend([int(s) for s in p_str])
p_str = input().split()
p.extend([int(s) for s in p_str])

count_list = []
for i in range(4):
   count =  p.count(i+1)
   count_list.append(count)

if(count_list.count(1)==2 and count_list.count(2)==2):
   print("YES")
else:
   print("NO")
Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


import sys
num =[]
for i in range(3):
    x,y = map(int,input().split(" "))
    num.append(x)
    num.append(y)
for i in range(1,4):
    if num.count(i)==3:
        print("NO")
        sys.exit()
print("YES")


Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):


num =[]
ans =0
for i in range(3):
    x,y = map(int,input().split(" "))
    num.append(x)
    num.append(y)
for i in range(1,5):

    if num.count(i)==3:
        ans +=1
if ans>0:
    print("NO")
else:
    print("YES")

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
city={1:0, 2:0, 3:0, 4:0}
for _ in range(3):
    a,b=map(int, input().split())
    city[a]+=1
    city[b]+=1
    
if list(city.values()).count(2)==2:
    print("Yes")
else:
    print("No")

Failing test case input:
1 1
2 4
3 3

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
city={1:0, 2:0, 3:0, 4:0}
for _ in range(3):
    a,b=map(int, input().split())
    city[a]+=1
    city[b]+=1
    
if list(city.values()).count(2)==2:
    print("YES")
else:
    print("NO")

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
list_ = [[int(x) for x in input().split()] for i in range(3)]
count = [0]*4
for i in range(3):
  count[list_[i][0]-1]+=1
  count[list_[i][1]-1]+=1
print(count)
if 3 in count:
  print('NO')
else:
  print('YES')

Failing test case input:
2 1
3 2
4 3

Expected output:
YES

Actual output:
[1, 2, 2, 1]
YES


Fixed submission (verdict: Accepted):
list_ = [[int(x) for x in input().split()] for i in range(3)]
count = [0]*4
for i in range(3):
  count[list_[i][0]-1]+=1
  count[list_[i][1]-1]+=1
if 3 in count:
  print('NO')
else:
  print('YES')

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
count1=0
count2=0
count3=0
count4=0
for i in range(3):
  a,b=(int(x) for x in input().split())
  if a==1 or b==1:
    count1 = count1 + 1
  elif a==2 or b==2:
    count2 = count2 + 1
  elif a==3 or b==3:
    count3 = count3 + 1
  elif a==4 or b==4:
    count4 = count4 + 1
if count1>2 or count2>2 or count3>2 or count4>2:
  print("NO")
else:
  print("YES")

Failing test case input:
1 2
3 3
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
count1=0
count2=0
count3=0
count4=0
for i in range(3):
  a,b=(int(x) for x in input().split())
  if a==1:
    count1 = count1 + 1
  elif a==2:
    count2 = count2 + 1
  elif a==3:
    count3 = count3 + 1
  elif a==4:
    count4 = count4 + 1
  if b==1:
    count1 = count1 + 1
  elif b==2:
    count2 = count2 + 1
  elif b==3:
    count3 = count3 + 1
  elif b==4:
    count4 = count4 + 1
if count1>2 or count2>2 or count3>2 or count4>2:
  print("NO")
else:
  print("YES")
Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


a1,b1=map(int,input().split())
a2,b2=map(int,input().split())
a3,b3=map(int,input().split())
lst=[a1,a2,a3,b1,b2,b3]
for i in range(1,4):
    if lst.count(i) > 2:
        print("NO")
        exit()
print("YES")

Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):


a1,b1=map(int,input().split())
a2,b2=map(int,input().split())
a3,b3=map(int,input().split())
lst=[a1,a2,a3,b1,b2,b3]
for i in range(1,5):

    if lst.count(i) > 2:
        print("NO")
        exit()
print("YES")

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a1,b1 = map(int,input().split())
a2,b2 = map(int,input().split())
a3,b3 = map(int,input().split())

l = [a1,a2,a3,b1,b2,b3]
l.sort()

x = True

for i in range(4):
    if l[i] == l[i+1] == l[i+2]:
        x = False
        break

for j in range(4):
    try:
        n = l.index(j+1)
    except ValueError:
        x = False


print("YES" if x == True else "No")

Failing test case input:
2 1
3 3
4 3

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
a1,b1 = map(int,input().split())
a2,b2 = map(int,input().split())
a3,b3 = map(int,input().split())

l = [a1,a2,a3,b1,b2,b3]
l.sort()

x = True

for i in range(4):
    if (l[i] == l[i+1]) and (l[i] == l[i+2]):
        x = False
if x == True:
    print("YES")
else:
    print("NO")

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
L = []
for _ in range(3):
  A,B = map(int,input().split()) 
  L.append(A)
  L.append(B)
L.sort()
M = []
a = L.count('1')
b = L.count('2')
c = L.count('3')
d = L.count('4')
M.append(a)
M.append(b)
M.append(c)
M.append(d)
M.sort()
if M == [1,1,2,2]:
  print('YES')
else:
  print('NO')


Failing test case input:
3 4
1 2
1 3

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
L = []
for _ in range(3):
  A,B = map(int,input().split()) 
  L.append(A)
  L.append(B)
L.sort()
M = []
a = L.count(1)
b = L.count(2)
c = L.count(3)
d = L.count(4)
M.append(a)
M.append(b)
M.append(c)
M.append(d)
M.sort()
if M == [1,1,2,2]:
  print('YES')
else:
  print('NO')

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p = input().split()
q = input().split()
r = input().split()

list_a = p + q + r
list_b = list(map(int, list_a))

list_b.sort()


if list_b.count(1)>=3:
    print("NO")
elif list_b.count(2)>=3:
    print("NO")
elif list_b.count(3)>=3:
    print("NO")
else:
    print("YES")

Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
p = input().split()
q = input().split()
r = input().split()

list_a = p + q + r
list_b = list(map(int, list_a))

list_b.sort()


if list_b.count(1)>=3:
    print("NO")
elif list_b.count(2)>=3:
    print("NO")
elif list_b.count(3)>=3:
    print("NO")
elif list_b.count(4)>=3:
    print("NO")
else:
    print("YES")
Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
nodes = [[] for i in range(4)]

a = [int(i) for i in input().split()]
nodes[a[0]-1].append(a[1]-1)
nodes[a[1]-1].append(a[0]-1)

b = [int(i) for i in input().split()]
nodes[b[0]-1].append(b[1]-1)
nodes[b[1]-1].append(b[0]-1)

c = [int(i) for i in input().split()]
nodes[c[0]-1].append(c[1]-1)
nodes[c[1]-1].append(c[0]-1)

seen = [0]*4

def dfs(i):
    seen[i] = 1
    
    for j in nodes[i]:
        if seen[j]==0:
            dfs(j)
    
dfs(0)
if seen.count(1)==4:
    print('YES')
else:
    print('NO')


Failing test case input:
4 4
1 3
2 3

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
nodes = [[] for i in range(4)]

a = [int(i) for i in input().split()]
nodes[a[0]-1].append(a[1]-1)
nodes[a[1]-1].append(a[0]-1)

b = [int(i) for i in input().split()]
nodes[b[0]-1].append(b[1]-1)
nodes[b[1]-1].append(b[0]-1)

c = [int(i) for i in input().split()]
nodes[c[0]-1].append(c[1]-1)
nodes[c[1]-1].append(c[0]-1)

ok = 0

ct = [0]*5

for i in range(1,5):
    ct[i] = a.count(i) + b.count(i) + c.count(i)

ct.sort(reverse=True)

ct = ct[:-1]

if ct[0]==2 and ct[1]==2 and ct[2]==1 and ct[3]==1:
    ok = 1

if ok:
    print('YES')
else:
    print('NO')

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c=[]
for i in range(3):
  a,b=map(int,input().split())
  c.append(a)
  c.append(b)
c=sorted(c)
ans='YES'
for j in range(1,4):
  cnt=0
  for i in range(6):
    if c[i]==j:
      cnt+=1
  if cnt>2:
    ans='NO'
    break

print(ans)


Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
c=[]
for i in range(3):
  a,b=map(int,input().split())
  c.append(a)
  c.append(b)
c=sorted(c)
ans='YES'
for j in range(1,5):
  cnt=0
  for i in range(6):
    if c[i]==j:
      cnt+=1
  if cnt>2:
    ans='NO'
    break

print(ans)

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a1,b1=map(int,input().split())
a2,b2=map(int,input().split())
a3,b3=map(int,input().split())
m = [a1,b1,a2,b2,a3,b3]

n={1:0,2:0,3:0,4:0}
for x in m:
    n[x]+=1
    
t=0
for i in range(3):
    i+=1
    if n[i] != 1 and n[i] != 2:
        t=1
        
if t == 0:
    print("YES")
else:
    print("NO")


Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
a1,b1=map(int,input().split())
a2,b2=map(int,input().split())
a3,b3=map(int,input().split())
m = [a1,b1,a2,b2,a3,b3]

n={1:0,2:0,3:0,4:0}
for x in m:
    n[x]+=1
    
t=0
for i in range(4):
    i+=1
    if n[i] != 1 and n[i] != 2:
        t=1
        
if t == 0:
    print("YES")
else:
    print("NO")
Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x=[]
x=input().split(" ")
a1=int(x[0])
b1=int(x[1])
y=[]
y=input().split(" ")
a2=int(y[0])
b2=int(y[1])
z=[]
z=input().split(" ")
a3=int(z[0])
b3=int(z[1])
X=[]
X.append(a1)
X.append(a2)
X.append(a3)
X.append(b1)
X.append(b2)
X.append(b3)
import collections
c=len(collections.Counter(X)) 
x1=X.count(1)
x2=X.count(2)
x3=X.count(3)
x4=X.count(4)
if x1==3 or x2==3 or x3==3 or x1==3 :
    print("NO")
elif c==4 :
    print("YES")
else :
    print("NO")


Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
x=[]
x=input().split(" ")
a1=int(x[0])
b1=int(x[1])
y=[]
y=input().split(" ")
a2=int(y[0])
b2=int(y[1])
z=[]
z=input().split(" ")
a3=int(z[0])
b3=int(z[1])
X=[]
X.append(a1)
X.append(a2)
X.append(a3)
X.append(b1)
X.append(b2)
X.append(b3)
import collections
c=len(collections.Counter(X)) 
x1=X.count(1)
x2=X.count(2)
x3=X.count(3)
x4=X.count(4)
Z=x1*x2*x3*x4
if Z==4 :
    print("YES")
else :
    print("NO")

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

import sys
sum = [0]*4

for i in range(0,3):
    a, b = map(int, input().split())
    sum[a-1] +=1
    sum[b-1] +=1

for i in range(0,3):
    if sum[i] == 3:
        print("NO")
        sys.exit()

print("YES")

Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):

import sys
sum = [0]*4

for i in range(0,3):
    a, b = map(int, input().split())
    sum[a-1] +=1
    sum[b-1] +=1

for i in range(0,4):
    if sum[i] >= 3:
        print("NO")
        sys.exit()

print("YES")

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ret = []
for i in range(3):
  ret+=list(map(int,input().split()))
ret.sort()
if ret.count(1)==2 and ret.count(2)==2 and ret.count(3)==2 and ret.count(4)==2:
  print('YES')
else:
  print('NO')

Failing test case input:
4 2
1 1
2 3

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
ret = []
for i in range(3):
  ret+=list(map(int,input().split()))
ret.sort()
if ret.count(1)==3 or ret.count(2)==3 or ret.count(3)==3 or ret.count(4)==3:
  print('NO')
else:
  print('YES')

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


num =[]
ans =0
for i in range(3):
    x,y = map(int,input().split(" "))
    num.append(x)
    num.append(y)
for i in range(1,5):
    print(i)
    if num.count(i)==3:
        ans +=1
if ans>0:
    print("NO")
else:
    print("YES")


Failing test case input:
4 2
1 3
3 1

Expected output:
YES


Actual output:
1
2
3
4
YES


Fixed submission (verdict: Accepted):


num =[]
ans =0
for i in range(3):
    x,y = map(int,input().split(" "))
    num.append(x)
    num.append(y)
for i in range(1,5):

    if num.count(i)==3:
        ans +=1
if ans>0:
    print("NO")
else:
    print("YES")
Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = 4*[0]
for i in range(3):
    n, k = list(map(int, input().split(" ")))
    a[n-1] += 1
    a[k-1] += 1

for i in range(3):
    if(a[i] == 3):
        print("NO")
        exit()
    if(a[i] == 0):
        print("NO")
        exit()

print("YES")

Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
a = 4*[0]
for i in range(3):
    n, k = list(map(int, input().split(" ")))
    a[n-1] += 1
    a[k-1] += 1

for i in range(4):
    if(a[i] == 3):
        print("NO")
        exit()

print("YES")

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ROADS = 3

range_city = list(range(1, 4+1))
appearance = []
for i in range(ROADS):
    a, b = map(int, input().split())
    appearance.append(a)
    appearance.append(b)

count = [appearance.count(city) for city in range_city]
if ROADS in count:
    print('YES')
else:
    print('NO')


Failing test case input:
2 1
3 2
4 2

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
ROADS = 3

range_city = list(range(1, 4+1))
appearance = []
for i in range(ROADS):
    a, b = map(int, input().split())
    appearance.append(a)
    appearance.append(b)

count = [appearance.count(city) for city in range_city]
if ROADS not in count:
    print('YES')
else:
    print('NO')

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = 4*[0]
for i in range(3):
    n, k = list(map(int, input().split(" ")))
    a[n-1] += 1
    a[k-1] += 1

for i in range(3):
    if(a[i] == 3):
        print("NO")
        exit()

print("YES")

Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
a = 4*[0]
for i in range(3):
    n, k = list(map(int, input().split(" ")))
    a[n-1] += 1
    a[k-1] += 1

for i in range(4):
    if(a[i] == 3):
        print("NO")
        exit()

print("YES")

Problem: p03130
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
road = [0]*4
for i in range(3):
  a,b = map(int,input().split())
  road[a-1]+=1
  road[b-1]+=1
if max(road)>=3:
  print('No')
else:
  print('Yes')

Failing test case input:
1 2
3 2
4 3

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
road = [0]*4
for i in range(3):
  a,b = map(int,input().split())
  road[a-1]+=1
  road[b-1]+=1
if max(road)>=3:
  print('NO')
else:
  print('YES')

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
 
a1,b1=map(int,input().split( ))
a2,b2=map(int,input().split( ))
a3,b3=map(int,input().split( ))
x=[a1,b1,a2,b2,a3,b3]
y=[x.count(i) for i in range(1,4)]
if max(y)==3:
    print("NO")
if max(y)==2:
    print("YES")

Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:

Fixed submission (verdict: Accepted):
 
a1,b1=map(int,input().split( ))
a2,b2=map(int,input().split( ))
a3,b3=map(int,input().split( ))
x=[a1,b1,a2,b2,a3,b3]
y=[x.count(i) for i in range(1,5)]
if max(y)==3 or min(y)==0:
    print("NO")

else:
    print("YES")
Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
li = []
for _ in range(3):
    li += list(map(int, input().split()))

mx = 0
for i in range(1, 5):
    mx = max(mx, li.count(i))

if mx == 3:
    ans = "No"
else:
    ans = "Yes"

print(ans)


Failing test case input:
3 1
3 3
4 2

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
li = []
for _ in range(3):
    li += list(map(int, input().split()))

mx = 0
for i in range(1, 5):
    mx = max(mx, li.count(i))

if mx == 3:
    ans = "NO"
else:
    ans = "YES"

print(ans)

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


num =[]
ans =0
for i in range(3):
    x,y = map(int,input().split(" "))
    num.append(x)
    num.append(y)
for i in range(1,4):
    if num.count(i)>=3:
        ans +=1
if ans>0:
    print("NO")
else:
    print("YES")


Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):


num =[]
ans =0
for i in range(3):
    x,y = map(int,input().split(" "))
    num.append(x)
    num.append(y)
for i in range(1,5):

    if num.count(i)==3:
        ans +=1
if ans>0:
    print("NO")
else:
    print("YES")

Problem: p03130
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

z = []
for i in range(3):
    a,b = inpl()
    z.append(a)
    z.append(b)
c = Counter(z)
for key in c.keys():
    if c[key] > 2:
        print('No')
        break
else:
    print('Yes')


Failing test case input:
1 4
2 2
3 2

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

z = []
for i in range(3):
    a,b = inpl()
    z.append(a)
    z.append(b)
c = Counter(z)
for key in c.keys():
    if c[key] > 2:
        print('NO')
        break
else:
    print('YES')
Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
inputList = []
inputList.extend(int(i) for i in input().split())
inputList.extend(int(i) for i in input().split())
inputList.extend(int(i) for i in input().split())

one = 0
two = 0
three = 0
four = 0

for i in inputList:
    if i == 1:
        one = one + 1
    elif i == 2:
        two = two + 1
    elif i == 3:
        three = three + 1
    elif i == 4:
        four = four + 1

if one >= 3 or two >= 3 or three >= 3 or four >= 3:
    print('No')
else:
    print('YES')


Failing test case input:
4 3
1 1
2 1

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
inputList = []
inputList.extend(int(i) for i in input().split())
inputList.extend(int(i) for i in input().split())
inputList.extend(int(i) for i in input().split())

one = 0
two = 0
three = 0
four = 0

for i in inputList:
    if i == 1:
        one = one + 1
    elif i == 2:
        two = two + 1
    elif i == 3:
        three = three + 1
    elif i == 4:
        four = four + 1

if one < 1 or one >= 3 or two < 1 or  two >= 3 or three < 1 or three >= 3 or four < 1 or four >= 3:
    print('NO')
else:
    print('YES')

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import heapq
from sys import stdin
input = stdin.readline














     
def main():
    count =[0]*4
    for i in range(3):
       a,b = map(int, input().split())
       count[a-1]+=1
       count[b-1]+=1
    flag = True
    for i in count:
        if i ==3:
            flag=False
    if flag:
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

Failing test case input:
3 2
3 4
1 2

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
import heapq
from sys import stdin
input = stdin.readline














     
def main():
    count =[0]*4
    for i in range(3):
       a,b = map(int, input().split())
       count[a-1]+=1
       count[b-1]+=1
    flag = True
    for i in count:
        if i ==3:
            flag=False
    if flag:
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

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


num =[]
ans =0
for i in range(3):
    x,y = map(int,input().split(" "))
    num.append(x)
    num.append(y)
for i in range(1,4):
    if num.count(i)>=3 or num.count(i)==0:
        ans +=1
if ans>0:
    print("NO")
else:
    print("YES")


Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):


num =[]
ans =0
for i in range(3):
    x,y = map(int,input().split(" "))
    num.append(x)
    num.append(y)
for i in range(1,5):

    if num.count(i)==3:
        ans +=1
if ans>0:
    print("NO")
else:
    print("YES")
Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
lis = [0 for i in range(4)]
for i in range(3):
    a,b = map(int,input().split())
    lis[a-1] += 1
    lis[b-1] += 1
if lis.count(2) == 4:
    print("YES")
else:print("NO")

Failing test case input:
2 4
3 1
3 2

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
from collections import Counter
lis = [0 for i in range(4)]
for i in range(3):
    a,b = map(int,input().split())
    lis[a-1] += 1
    lis[b-1] += 1
if lis.count(2) == 2:
    print("YES")
else:print("NO")

Problem: p03130
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a1, b1 = map(int, input().split())
a2, b2 = map(int, input().split())
a3, b3 = map(int, input().split())

route_lists = [a1, b1, a2, b2, a3, b3]
count_lists = []
for i in range(1, 4, 1):
    cnt = route_lists.count(i)
    count_lists.append(cnt)

max = count_lists[0]
for j in range(1, 3, 1):
    if max < count_lists[j]:
        max = count_lists[j]

if max > 2:
    ans = 'NO'
else:
    ans = 'YES'

print(ans)

Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
a1, b1 = map(int, input().split())
a2, b2 = map(int, input().split())
a3, b3 = map(int, input().split())

route_lists = [a1, b1, a2, b2, a3, b3]
cnt_lists = []

for i in range(1, 5, 1):
    cnt = route_lists.count(i)
    cnt_lists.append(cnt)

if 3 in cnt_lists:
    ans = 'NO'
else:
    ans = 'YES'

print(ans)

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ds = {}
for i in range(3):
    s = input()
    ks = [int(i) for i in s.split(' ')]
    for k in ks:
        if k in ds:
            ds[k] += 1
        else:
            ds[k] = 1


for k in ds:
    if ds[k] == 3:
        print('NO')
print('YES')



Failing test case input:
1 3
2 3
4 3

Expected output:
NO


Actual output:
NO
YES


Fixed submission (verdict: Accepted):
ds = {}
for i in range(3):
    s = input()
    ks = [int(i) for i in s.split(' ')]
    for k in ks:
        if k in ds:
            ds[k] += 1
        else:
            ds[k] = 1


for k in ds:
    if ds[k] == 3:
        print('NO')
        exit()
print('YES')

Problem: p03130
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a1, b1 = map(int, input().split())
a2, b2 = map(int, input().split())
a3, b3 = map(int, input().split())

route_lists = [a1, b1, a2, b2, a3, b3]
cnt_lists = []

for i in range(4):
    cnt = route_lists.count(i)
    cnt_lists.append(cnt)

if 3 in cnt_lists:
    ans = 'NO'
else:
    ans = 'YES'

print(ans)

Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
a1, b1 = map(int, input().split())
a2, b2 = map(int, input().split())
a3, b3 = map(int, input().split())

route_lists = [a1, b1, a2, b2, a3, b3]
cnt_lists = []

for i in range(1, 5, 1):
    cnt = route_lists.count(i)
    cnt_lists.append(cnt)

if 3 in cnt_lists:
    ans = 'NO'
else:
    ans = 'YES'

print(ans)
Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input = sys.stdin.readline

nums = [0 for _ in range(4)]

for _ in range(3):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    nums[a] += 1
    nums[b] += 1

nums.sort()

if nums[0] == 1 and nums[3] == 2: 
    print("Yes")
else:
    print("NO")

Failing test case input:
2 1
3 3
4 4

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline

nums = [0 for _ in range(4)]

for _ in range(3):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    nums[a] += 1
    nums[b] += 1

nums.sort()

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

Problem: p03130
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import defaultdict
dic = defaultdict(int)

for i in range(3):
    p,q = map(int,input().split())
    dic[p] += q

L = []
for v in dic.values():
    L.append(v)

odd = [x%2 ==1 for x in L]
even = [x%2 ==0 for x in L]

if sum(odd) == 2 or sum(even) == 4:
    print("YES")
else:
    print("NO")

Failing test case input:
3 2
2 4
1 3

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
from collections import defaultdict
dic = defaultdict(int)

for i in range(3):
    p,q = map(int,input().split())
    dic[p] += 1
    dic[q] += 1

L = []
for v in dic.values():
    L.append(v)

odd = [x%2 ==1 for x in L]
even = [x%2 ==0 for x in L]

if sum(odd) == 2 or sum(even) == 4:
    print("YES")
else:
    print("NO")

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = []
result = "YES"
for i in range(3) :
    a.extend(input().split(" "))

for i in range(4) :
    if a.count(str(i)) >= 3 :
        result = "NO"
        break
    
print(result)

Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
a = []
result = "YES"
for i in range(3) :
    a.extend(input().split(" "))

for i in range(1,5) :
    if a.count(str(i)) >= 3 or a.count(str(i)) == 0:
        result = "NO"
        break
    
print(result)

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
I=input;s=I()+I()+I();print("YNEOS"[any(s.count(x)>1for x in "1234")::2])

Failing test case input:
2 4
1 4
3 1

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
I=input;s=I()+I()+I();print("YNEOS"[any(s.count(x)>2for x in"1234")::2])

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = 3
num_list = [list(map(int, input().split())) for _ in range(n)]
N = (sum(num_list, []))
N1 = N.count(1)
N2 = N.count(2)
N3 = N.count(3)
N4= N.count(4)
if (N1 or N2 or N3 or N4) >= 3:
    print('NO')
else:
    print('YES')


Failing test case input:
1 3
3 2
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
n = 3
num_list = [list(map(int, input().split())) for _ in range(n)]
N = (sum(num_list, []))
N1 = N.count(1)
N2 = N.count(2)
N3 = N.count(3)
N4= N.count(4)
if N1 > 2 or N2 > 2 or N3 > 2 or N3 > 2 or N4 > 2:
    print('NO')
else:
    print('YES')
Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))
l = []
for i in range(3):
    a,b = iim()
    l.append(a)
    l.append(b)

for i in range(1,4):
    if l.count(i) == 3:
        print('NO')
        exit()
print('YES')



Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))
l = []
for i in range(3):
    a,b = iim()
    l.append(a)
    l.append(b)

for i in range(1,5):
    if l.count(i) == 3:
        print('NO')
        exit()
print('YES')

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
lis = [map(int, input().split()) for _ in range(3)]

ans = "YES"

for i in range(4):
  a = lis.count(i+1)
  if a >= 3:
    ans = "NO"
    break
print(ans)

Failing test case input:
1 2
2 2
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
lis = []
for i in range(3):
  lis = lis + list(map(int, input().split()))


ans = "YES"

for i in range(4):
  a = lis.count(i+1)
  if a >= 3:
    ans = "NO"
    break
print(ans)

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = []
for i in range(3):
    x.append(list(map(int,input().split())))
one,two,three,four = 0,0,0,0
def push(a):
    global one,two,three,four
    if a == 1:
        one = one + 1
    elif a ==2:
        two += 1
    elif a == 3:
        three += 1
    else :
        four +=1
for i in x:
    push(i[0])
    push(i[1])
if one*two*three*four ==0 or one ==3 or two ==3 or three ==3:
    print("NO")
else :
    print("YES")

Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
x = []
for i in range(3):
    x.append(list(map(int,input().split())))
one,two,three,four = 0,0,0,0
def push(a):
    global one,two,three,four
    if a == 1:
        one = one + 1
    elif a ==2:
        two += 1
    elif a == 3:
        three += 1
    else :
        four +=1
for i in x:
    push(i[0])
    push(i[1])
if one*two*three*four ==0 or one ==3 or two ==3 or three ==3 or four ==3:
    print("NO")
else :
    print("YES")

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = []
result = "YES"
for i in range(3) :
    a.extend(input().split(" "))

for i in range(4) :
    if a.count(str(i)) >= 3:
        result = "NO"
        break
    elif a.count(str(i)) == 0 :
        result = "NO"
        break
    
print(result)

Failing test case input:
1 4
2 3
2 3

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
a = []
result = "YES"
for i in range(3) :
    a.extend(input().split(" "))

for i in range(1,5) :
    if a.count(str(i)) >= 3 or a.count(str(i)) == 0:
        result = "NO"
        break
    
print(result)
Problem: p03130
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
l = []
for i in range(3):
  a,b = map(int, input().split())
  l.append(a)
  l.append(b)

for i in range(1,5):
  cnt=0
  for itm in l:
    if i==l:
      cnt+=1
  if cnt>=3:
    print("NO")
    exit()
print("YES")
  	
  

Failing test case input:
1 3
3 2
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
l = []
for i in range(3):
  a,b = map(int, input().split())
  l.append(a)
  l.append(b)

for i in range(1,5):
  cnt=0
  for itm in l:
    if i==itm:
      cnt+=1
  if cnt>=3:
    print("NO")
    exit()
print("YES")

Problem: p03130
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
d=[0,0,0,0]
for i in range(3):
    a,b=map(int,input().split())
    d[a-1]+=1
    d[b-1]+=1

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

Failing test case input:
2 4
4 1
3 2

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
d=[0,0,0,0]
for i in range(3):
    a,b=map(int,input().split())
    d[a-1]+=1
    d[b-1]+=1

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

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
def solve(ABs):
    ABs = sorted([ (min(a, b), max(a, b)) for (a, b) in ABs])
    ac = Counter([a for (a, b) in ABs])
    bc = Counter([a for (a, b) in ABs])
    if len(ac) == 3 or len(bc) == 3:
        return "YES"
    else:
        return "NO"


if __name__ == "__main__":
    ABs = [tuple(map(int, input().split(" "))) for _ in range(3)]
    print(solve(ABs))


Failing test case input:
3 2
2 4
1 3

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
from collections import Counter


def solve(ABs):
    ac = Counter([a for (a, b) in ABs] + [b for (a, b) in ABs])
    if "".join(sorted([str(v) for v in ac.values()])) == "1122":
        return "YES"
    else:
        return "NO"


if __name__ == "__main__":
    ABs = [tuple(map(int, input().split(" "))) for _ in range(3)]
    print(solve(ABs))
Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a_b=[]
a=[]
b=[]
judge=[]
judge_count=0
yes_no_count=1
for i in range(3):
    a_blank,b_blank=map(int,input().split())
    a.append(a_blank)
    b.append(b_blank)

a_b.extend(a)
a_b.extend(b)
for i in range(1,4+1):
    for j in a_b:
        if i==j:
            judge_count+=1
    judge.append(judge_count)
    judge_count=0

for i in judge:
    yes_no_count+=1
    if i==0 or i>=3:
        print("NO")
        break
    elif len(judge)==yes_no_count:
        print("YES")

Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES
NO


Fixed submission (verdict: Accepted):
a_b=[]
a=[]
b=[]
judge=[]
judge_count=0
yes_no_count=0
for i in range(3):
    a_blank,b_blank=map(int,input().split())
    a.append(a_blank)
    b.append(b_blank)

a_b.extend(a)
a_b.extend(b)
for i in range(1,4+1):
    for j in a_b:
        if i==j:
            judge_count+=1
    judge.append(judge_count)
    judge_count=0

for i in judge:
    yes_no_count+=1
    if i==0 or i>=3:
        print("NO")
        break
    elif len(judge)==yes_no_count:
        print("YES")

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
li = [0,0,0,0]
for i in range(0,3):
    a,b = map(int,input().split())
    a -= 1
    b -= 1
    li[a] += 1
kisuu = 0
for i in range(0,4):
    if li[i] % 2 == 1:
        kisuu += 1
if kisuu == 2:
    print("YES")
else:
    print("NO")


Failing test case input:
2 4
1 2
4 3

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
li = [0,0,0,0]
for i in range(0,3):
    a,b = map(int,input().split())
    a -= 1
    b -= 1
    li[a] += 1
    li[b] += 1
kisuu = 0
for i in li:
    if i % 2 == 1:
        kisuu += 1
if kisuu == 2:
    print("YES")
else:
    print("NO")

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A=[]
for i in range(3):
    A.append(list(map(int,input().split())))
 
print(A)
C=[0,0,0,0,0]
for i in range(len(A)) :
    C[A[i][0]]+=1
    C[A[i][1]]+=1
 
print(C)
co=0
for i in range(1,5):
    if C[i]==1 or C[i]==3 :
        co+=1
 
if co==0 or co==2 :
    print("YES")
else :
    print("NO")


Failing test case input:
1 4
3 2
3 2

Expected output:
YES


Actual output:
[[1, 4], [3, 2], [3, 2]]
[0, 1, 2, 2, 1]
YES


Fixed submission (verdict: Accepted):
A=[]
for i in range(3):
    A.append(list(map(int,input().split())))
 

C=[0,0,0,0,0]
for i in range(len(A)) :
    C[A[i][0]]+=1
    C[A[i][1]]+=1
 

co=0
for i in range(1,5):
    if C[i]==1 or C[i]==3 :
        co+=1
 
if co==0 or co==2 :
    print("YES")
else :
    print("NO")

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
cnt = [0] * 4
for _ in range(3):
    a, b = map(int, input().split())
    cnt[a-1] += 1
    cnt[b-1] += 1

if cnt.count(2) > 2:
    print("NO")
else:
    print("YES")

Failing test case input:
1 4
3 3
3 2

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
cnt = [0 for i in range(4)]

for i in range(3):
    a, b = map(int, input().split())
    cnt[a-1] += 1
    cnt[b-1] += 1

if cnt.count(2) == 2 and cnt.count(1) == 2:
    print("YES")
else:
    print("NO")
Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
abl = [map(int,input().split()) for nesya in range(3)]
s = [1,1,2,2,3,3,4,4]
c = 0
for ab in abl:
  for n in ab:
    if n in abl:
      s.remove(n)
    else:
      c += 1
if c == 0:
  print('YES')
else:
  print('NO')

Failing test case input:
4 2
1 3
2 3

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):
abl = [map(int,input().split()) for nesya in range(3)]
s = [1,1,2,2,3,3,4,4]
c = 0
for ab in abl:
  for n in ab:
    if n in s:
      s.remove(n)
    else:
      c += 1
if c == 0:
  print('YES')
else:
  print('NO')

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def solve():
  count = [0] * 4
  for i in range(3):
    A, B = map(int, input().split())
    count[A - 1] += 1
    count[B - 1] += 1

  time = [0] * 2
  for c in count:
    if c != 1 or c != 2: continue
    time[c - 1] += 1

  return 'YES' if time[0] == 2 and time[1] == 2 else 'NO'

print(solve())


Failing test case input:
1 3
2 4
4 3

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
def solve():
  count = [0] * 4
  for i in range(3):
    A, B = map(int, input().split())
    count[A - 1] += 1
    count[B - 1] += 1

  time = [0] * 2
  for c in count:
    if c != 1 and c != 2: continue
    time[c - 1] += 1

  return 'YES' if time[0] == 2 and time[1] == 2 else 'NO'

print(solve())

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


import sys
num =[]
for i in range(3):
    x,y = map(int,input().split(" "))
    num.append(x)
    num.append(y)
for i in range(1,4):
    if num.count(i)>=3:
        print("NO")
        sys.exit()
print("YES")


Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):


num =[]
ans =0
for i in range(3):
    x,y = map(int,input().split(" "))
    num.append(x)
    num.append(y)
for i in range(1,5):

    if num.count(i)==3:
        ans +=1
if ans>0:
    print("NO")
else:
    print("YES")

Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def calc(x:list, y:int):
    if x.count(y) == 0:
        return -100
    elif x.count(y) == 1:
        return -1
    elif x.count(y) == 2:
        return 1
    elif x.count(y) > 2:
        return -100

loads = []
for _ in range(3):
    loada, loadb = input().split()
    loads.append(int(loada))
    loads.append(int(loadb))

x = 0
for i in range(1,5):
    print(i, calc(loads, i))
    x = x + calc(loads, i)

if x == 0:
    print('YES')
else:
    print('NO')

Failing test case input:
1 4
2 3
2 3

Expected output:
YES


Actual output:
1 -1
2 1
3 1
4 -1
YES


Fixed submission (verdict: Accepted):
def calc(x:list, y:int):
    if x.count(y) == 0:
        return -100
    elif x.count(y) == 1:
        return -1
    elif x.count(y) == 2:
        return 1
    elif x.count(y) > 2:
        return -100

loads = []
for _ in range(3):
    loada, loadb = input().split()
    loads.append(int(loada))
    loads.append(int(loadb))

x = 0
for i in range(1,5):
    x = x + calc(loads, i)

if x == 0:
    print('YES')
else:
    print('NO')
Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X = []
for i in range(3):
    X.append(input().split())
a1 = 0
a2 = 0
a3 = 0
a4 = 0
for i in X:
    for j in i:
        if j == "1":
            a1 = 1
        elif j == "2":
            a2 = 1
        elif j == "3":
            a3 = 1
        elif j == "4":
            a4 = 1
if a1 == 1 and a2 == 1 and a3 == 1 and a4 == 1:
    print("YES")
else:
    print("NO")

Failing test case input:
1 4
3 3
3 2

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
X = []
for i in range(3):
    X.append(input().split())
a1 = 0
a2 = 0
a3 = 0
a4 = 0
for i in X:
    for j in i:
        if j == "1":
            a1 += 1
        elif j == "2":
            a2 += 1
        elif j == "3":
            a3 += 1
        elif j == "4":
            a4 += 1
if 1<= a1 <= 2 and 1<= a2 <= 2 and 1<= a3 <= 2 and 1<= a4 <= 2:
    print("YES")
else:
    print("NO")

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

a1,b1 = map(int,input().split())
a2,b2 = map(int,input().split())
a3,b3 = map(int,input().split())

l = [a1,a2,a3,b1,b2,b3]
l.sort()

x = True

for i in range(4):
    if l[i] == l[i+1] == l[i+2]:
        x = False
        break

for j in range(4):
    try:
        n = l.index(j+1)
    except ValueError:
        x = False


print("YES" if x == True else "No")

Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
a1,b1 = map(int,input().split())
a2,b2 = map(int,input().split())
a3,b3 = map(int,input().split())

l = [a1,a2,a3,b1,b2,b3]
l.sort()

x = True

for i in range(4):
    if (l[i] == l[i+1]) and (l[i] == l[i+2]):
        x = False
if x == True:
    print("YES")
else:
    print("NO")

Problem: p03130
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
l = []

for i in range(3):
    l += list(map(int, input().split()))
    
for i in range(4):
    if l.count(i) == 3:
        print('NO')
        break
else:
    print('YES')

Failing test case input:
1 2
4 4
4 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
l = []

for _ in range(3):
    l += list(map(int, input().split()))

for i in range(4):
    if l.count(i + 1) == 3:
        print('NO')
        break
else:
    print('YES')

Problem: p03130
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a=input().split()
b=int(a[0])
c=int(a[1])
d=input().split()
e=int(d[0])
f=int(d[1])
g=input().split()
h=int(g[0])
i=int(g[1])
L=[b,c,e,f,h,i]
if L.count('1') or L.count('2') or L.count('3') or L.count('4') ==3:
    print('NO')
else:
    print('YES')

Failing test case input:
2 4
1 3
3 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
a=input().split()
b=a[0]
c=a[1]
d=input().split()
e=d[0]
f=d[1]
g=input().split()
h=g[0]
i=g[1]
L=[b,c,e,f,h,i]
if L.count('1')==3 or L.count('2')==3 or L.count('3')==3 or L.count('4') ==3:
    print('NO')
else:
    print('YES')
Problem: p03130
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import*
print("YNEOS"[Counter(open(0).read().split()).most_common()[0][1]!=3::2])

Failing test case input:
2 1
3 2
4 1

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
from collections import*
print("YNEOS"[Counter(open(0).read().split()).most_common()[0][1]==3::2])