Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
W=int(input())
H=int(input())
x=int(input())
y=int(input())
r=int(input())
if x-r<0||y-r<0||x+r>W||y+r>H :
    print("NO")
else:
    print("NO")



Fixed submission:
W,H,x,y,r=map(int,input().split())
if x-r<0 or y-r<0 or x+r>W or y+r>H :
    print("No")
else:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
W=int(input())
H=int(input())
x=int(input())
y=int(input())
r=int(input())
if x-r<0 or y-r<0 or x+r>W or y+r>H :
    print("NO")
else:
    print("NO")



Fixed submission:
W,H,x,y,r=map(int,input().split())
if x-r<0 or y-r<0 or x+r>W or y+r>H :
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
counter=0

while True:
    counter+=1
    x=int(input())
    if x==0:
        break
    print("Case "+counter+": "+x)


Fixed submission:
counter=0

while True:
    counter+=1
    x=int(input())
    if x==0:
        break
    print("Case "+str(counter)+": "+str(x))
Buggy python submission (verdict: Time Limit Exceeded):
a,b,c=map(int,input().split())
count=0
while a<=b:
    if c%a==0:
        count+=1

print(count)


Fixed submission:
a,b,c=map(int,input().split())
count=0
while a<=b:
    if c%a==0:
        count+=1
    a+=1
print(count)
Buggy python submission (verdict: Runtime Error):

n = int(input())
S = input().split()
q = int(input())
T = input().split()
cnt = 0

for i in range(len(S)):
    S[i]=int(S[i])
for i in range(len(T)):
    T[i]=int(T[i])
for i in range(len(S)):
    x=0
    light=0
    reft=n
    while left<right and x==0:
        mid=int((left+right)/2)
        if S[mid]==T[i]:
            cnt+=1
            x+=1
        elif T[i]<S[mid]:
            right=mid
        else:
            left=mid+1
print(cnt)



Fixed submission:
def binarySearch(array, key):
    left = 0
    right = len(array)
    while left < right:
        mid = int((left + right) / 2)
        if key == array[mid]:
            return True
        elif key > array[mid]:
            left = mid + 1
        elif key < array[mid]:
            right = mid
        else:
            print("ERROR")
    return False
 
 
n = int(input())
s = [int(x) for x in input().split()]
q = int(input())
t = [int(x) for x in input().split()]
a = [x for x in t if binarySearch(s, x)]
print(len(a))

Buggy python submission (verdict: Runtime Error):
n = int(input())
S = input().split()
q = int(input())
T = input().split()
cnt = 0

for i in range(len(S)):
    S[i]=int(S[i])
for i in range(len(T)):
    T[i]=int(T[i])
for i in range(len(S)):
    x=0
    left=0
    right=n
    while left<right and x==0:
        mid=int((left+right)/2)
        if S[i]==T[mid]:
            cnt+=1
            x+=1
        elif S[i]<T[mid]:
            right=mid
        else:
            left=mid+1
print(cnt)



Fixed submission:
def binarySearch(array, key):
    left = 0
    right = len(array)
    while left < right:
        mid = int((left + right) / 2)
        if key == array[mid]:
            return True
        elif key > array[mid]:
            left = mid + 1
        elif key < array[mid]:
            right = mid
        else:
            print("ERROR")
    return False
 
 
n = int(input())
s = [int(x) for x in input().split()]
q = int(input())
t = [int(x) for x in input().split()]
a = [x for x in t if binarySearch(s, x)]
print(len(a))

Buggy python submission (verdict: Runtime Error):
n = int(input())
S = input().split()
q = int(input())
T = input().split()
cnt = 0

for i in range(len(S)):
    S[i]=int(S[i])
for i in range(len(T)):
    T[i]=int(T[i])
for i in range(len(S)):
    x=0
    left=0
    right=n
    while left<right and x==0:
        mid=int((left+right)/2)
        if S[i]==T[mid]:
            cnt+=1
            x+=1
        elif S[i]<T[mid]:
            right=mid
        else:
            left=mid+1
print(cnt)



Fixed submission:
def binarySearch(array, key):
    left = 0
    right = len(array)
    while left < right:
        mid = int((left + right) / 2)
        if key == array[mid]:
            return True
        elif key > array[mid]:
            left = mid + 1
        elif key < array[mid]:
            right = mid
        else:
            print("ERROR")
    return False
 
 
n = int(input())
s = [int(x) for x in input().split()]
q = int(input())
t = [int(x) for x in input().split()]
a = [x for x in t if binarySearch(s, x)]
print(len(a))
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
while a<=1 or 100<=a:
    while b<=1 or 100<=b:
        a,b=int(input());

S=a*b;
L=a+a+b+b;

print(S,L);


Fixed submission:
a,b=map(int,input().split());
print(a*b,2*a+2*b);

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
while a<=1 or 100<=a:
    while b<=1 or 100<=b:
        a,b=int(input());

S=a*b;
L=a+a+b+b;

print(S,L);



Fixed submission:
a,b=map(int,input().split());
print(a*b,2*a+2*b);

Buggy python submission (verdict: Runtime Error):
a=input() 
line=a.split()
x=int(line[0])
y=int(line[1])
z1=x*y
z2=x*2+y*2
z3=str(z1)
z4=str(z2)
print(z1,z2)


Fixed submission:
a=input() 
line=a.split()
x=int(line[0])
y=int(line[1])
z1=x*y
z2=x*2+y*2
z3=str(z1)
z4=str(z2)
print(z3,z4)

Buggy python submission (verdict: Runtime Error):
a=input() 
line=a.split()
x=int(line[0])
y=int(line[1])
z1=x*y
z2=x*2+y*2
z3=str(z1)
z4=str(z2)
print(z3,z4)


Fixed submission:
a=input() 
line=a.split()
x=int(line[0])
y=int(line[1])
z1=x*y
z2=x*2+y*2
z3=str(z1)
z4=str(z2)
print(z3,z4)
Buggy python submission (verdict: Runtime Error):
n=int(input());
G=[[0 for i in range(n)]for j in range(n)]
for i in range(n):
    list=[int(m) for m in input().split()]
    u=list[0]
    k=list[1]
    for j in range(2,len(list)):
        v=list[j]
        G[u-1][v-1]=1
for i in range(n):
    for j in range(n):
        print(G[i][j],end="")
        if j!=len(g[i])-1:
            print(" ",end="")
    print()



Fixed submission:
n=int(input());
G=[[0 for i in range(n)]for j in range(n)]
for i in range(n):
    list=[int(m) for m in input().split()]
    u=list[0]
    k=list[1]
    for j in range(2,len(list)):
        v=list[j]
        G[u-1][v-1]=1
for i in range(n):
    for j in range(n):
        if j!=n-1:
            print(G[i][j],end=" ")
        else:
            print(G[i][j],end="\n")
Buggy python submission (verdict: Runtime Error):
S=[]
T=[]
n=int(input())
s=input().split()
for i in range(n):
	S.append(s[i])

q=int(input())
t=input().split()
for j in range(q):
	T.append(t[j])

cnt=0
for i in range(n):
	for j in range(q):
		if S[i]==T[j]:
			cnt+=1

print(cnt)


Fixed submission:
S=[]
T=[]
n=int(input())
s=input().split()
for i in range(n):
	S.append(s[i])
q=int(input())
t=input().split()
for j in range(q):
	T.append(t[j])
cnt=0
for i in range(q):
	for j in range(n):
		if T[i]==S[j]:
			cnt+=1
			break
print(cnt)

Buggy python submission (verdict: Runtime Error):
S=[]
T=[]
n=int(input())
s=input().split()
for i in range(n):
	S.append(s[i])

q=int(input())
t=input().split()
for j in range(q):
	T.append(t[j])

cnt=0
for i in range(n):
	for j in range(q):
		if S[i]==T[j]:
			cnt+=1

print(cnt)


Fixed submission:
S=[]
T=[]
n=int(input())
s=input().split()
for i in range(n):
	S.append(s[i])
q=int(input())
t=input().split()
for j in range(q):
	T.append(t[j])
cnt=0
for i in range(q):
	for j in range(n):
		if T[i]==S[j]:
			cnt+=1
			break
print(cnt)

Buggy python submission (verdict: Runtime Error):
S=[]
T=[]
n=int(input())
s=input().split()
for i in range(n):
	S.append(s[i])
q=int(input())
t=input().split()
for j in range(q):
	T.append(t[j])
cnt=0
for i in range(n):
	for j in range(q):
		if S[i]==T[j]:
			cnt+=1
print(cnt)


Fixed submission:
S=[]
T=[]
n=int(input())
s=input().split()
for i in range(n):
	S.append(s[i])
q=int(input())
t=input().split()
for j in range(q):
	T.append(t[j])
cnt=0
for i in range(q):
	for j in range(n):
		if T[i]==S[j]:
			cnt+=1
			break
print(cnt)
Buggy python submission (verdict: Runtime Error):
s=[]

cnt=0

while 1:
    max=0
    n,m =map(int,input().split())
    l=list(map(int,input().split()))
    if n==0 and m==0:
        break

    for i in range(len(l)):
        for j in range(len(l)):
            if max<l[i]+l[j] and i!=j and m>=l[i]+l[j]:
                max=l[i]+l[j]

    if max==0:
        s+=["NONE"]
    else:
        s+=[max]


for x in s:
    print(x)



Fixed submission:

s=[]

cnt=0

while 1:
    max=0
    n,m =map(int,input().split())
    if n==0 and m==0:
        break
    l=list(map(int,input().split()))


    for i in range(len(l)):
        for j in range(len(l)):
            if max<l[i]+l[j] and i!=j and m>=l[i]+l[j]:
                max=l[i]+l[j]

    if max==0:
        s+=["NONE"]
    else:
        s+=[max]


for x in s:
    print(x)

Buggy python submission (verdict: Runtime Error):
s=[]

cnt=0

while 1:
    max=0
    n,m =map(int,input().split())
    l=list(map(int,input().split()))
    if n==0 and m==0:
        break

    for i in range(len(l)):
        for j in range(len(l)):
            if max<l[i]+l[j] and i!=j and m>=l[i]+l[j]:
                max=l[i]+l[j]

    if max==0:
        s+=["NONE"]
    else:
        s+=[max]


for x in s:
    print(x)



Fixed submission:

s=[]

cnt=0

while 1:
    max=0
    n,m =map(int,input().split())
    if n==0 and m==0:
        break
    l=list(map(int,input().split()))


    for i in range(len(l)):
        for j in range(len(l)):
            if max<l[i]+l[j] and i!=j and m>=l[i]+l[j]:
                max=l[i]+l[j]

    if max==0:
        s+=["NONE"]
    else:
        s+=[max]


for x in s:
    print(x)
Buggy python submission (verdict: Runtime Error):
s=[]

while 1:
        l1=list(input().split())
        if l1==".":
            break
        l2=list(input().split())

        if l1==l2:
            s+=["INDENTCAL"]
        elif len(set(l1+l2))==1:
            s+=["CLODSE"]
        else:
            s+=["DIFFERENT"]


print(s)


Fixed submission:
s=[]

while 1:
    l1=input()
    if l1==".":
        break
    l2=input()

    sp1=l1.split('"')
    sp2=l2.split('"')
    
    t=0
    if len(sp1)==len(sp2):
        for i in range(len(sp1)):
            if i%2==1 and sp1[i]!=sp2[i]:
                t+=1
            elif i%2!=1 and sp1[i]!=sp2[i]:
                t+=2


    if sp1==sp2:
        s+=["IDENTICAL"]
    elif t==1:
        s+=["CLOSE"]
    else:
        s+=["DIFFERENT"]

for x in s:
    print(x)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())

l=[[0 for i in range(n)] for j in range(n)]##静的確保 隣接行列
d=[0 for i in range(n)]##発見
f=[0 for i in range(n)]##完了
stack=[]##スタック
check=[]

for i in range(n):
    p=[int(x) for x in input().split()]
    
    for j in range(n):
        if j+1 in p[2:]:
            l[i][j]=1
##print("---隣接行列---")
##print(l)

time=1


while len(check)<n:
    for i in range(n):
        if i+1 not in check:
            stack+=[i+1]
            d[i]=time
            break
        else: pass

    while len(stack)!=0:
        ##print("----------while---------")
        for i in range(n):
            if l[stack[-1]-1][i]==1 and not i+1 in check and stack[-1]-1!=i:
                time+=1
                d[i]=time
                stack+=[i+1]

               ## print("stack:",stack)
               ## print("check:",check)
               ## print("d[",i,"]:",d[i])
                break
            elif i==n-1:
##最深    
                check+=[stack[-1]]
                time+=1
                f[stack.pop()-1]=time

               ## print("f[",i,"]:",f[i])
               ## print("check:",check)
    time+=1


for i in range(n):
    print(i+1,d[i],f[i])



Fixed submission:

n=int(input())

l=[[0 for i in range(n)] for j in range(n)]##静的確保 隣接行列
d=[0 for i in range(n)]##発見
f=[0 for i in range(n)]##完了
stack=[]##スタック
check=[]

for i in range(n):
    p=[int(x) for x in input().split()]
    
    for j in range(n):
        if j+1 in p[2:]:
            l[i][j]=1
##print("---隣接行列---")
##print(l)

time=1


while len(check)<n:
    for i in range(n):
        if i+1 not in check:
            stack+=[i+1]
            d[i]=time
            break
        else: pass

    while len(stack)!=0:
        ##print("----------while---------")
        for i in range(n):
            if l[stack[-1]-1][i]==1 and not i+1 in check and i+1 not in stack and stack[-1]-1!=i:
                time+=1
                d[i]=time
                stack+=[i+1]

               ## print("stack:",stack)
               ## print("check:",check)
               ## print("d[",i,"]:",d[i])
                break
            elif i==n-1:
##最深    
                check+=[stack[-1]]
                time+=1
                f[stack.pop()-1]=time

               ## print("f[",i,"]:",f[i])
               ## print("check:",check)
    time+=1


for i in range(n):
    print(i+1,d[i],f[i])
Buggy python submission (verdict: Runtime Error):
N=input()
print(N**3)


Fixed submission:
N=int(input())
print(N**3)
Buggy python submission (verdict: Runtime Error):
A,B=map(int(input().split()))
print(A*B,(A+B)*2)


Fixed submission:
A,B=map(int,input().split())
print(A*B,(A+B)*2)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
x=[0]*n
for i in range(n):
	x[i]=int(input())
cnt=0
cnt2=0
for i in range(n):
	for j in range(1,x[i]+1):
		if x[i]%j==0:
			cnt+=1
	if cnt==2:
		cnt2+=1
	cnt=0

print(cnt2)


Fixed submission:
import math

N=int(input())

A=[0 for i in range(N)]
for i in range(N):
	A[i]=int(input())

c=0 
cnt=0

for k in range(N):
	x=math.sqrt(A[k])
	x=(int)(x)
	for j in range(2,x+1):
		if A[k]%j==0:
			cnt+=1
			break
	if cnt==0:
		c+=1
	
	cnt=0


print(c)
Buggy python submission (verdict: Time Limit Exceeded):
sn = int(input())
S = [0 for i in range(sn)]
S = input().split()
for i in range(sn):
	S[i] = int(S[i])

tn = int(input())
T = [0 for i in range(tn)]
T = input().split()
for i in range(tn):
	T[i] = int(T[i])

A=[]
cnt=0

for i in range(tn):

	key=T[i]
	left=0
	right=sn

	while left<right:

		mid=(int)((left+right)/2)

		if S[mid]==key:
			if T[i] not in A:
				cnt+=1
			A.append(key)
			break

		if S[mid]>key:
			right=mid
			
		if S[mid]<key:
			left=mid+1


print(cnt)


Fixed submission:

sn = int(input())
S = [0 for i in range(sn)]
S = input().split()
for i in range(sn):
	S[i] = int(S[i])

tn = int(input())
T = [0 for i in range(tn)]
T = input().split()
for i in range(tn):
	T[i] = int(T[i])


cnt=0

for i in range(tn):

	key=T[i]
	left=0
	right=sn
	c=0

	while left<right:

		mid=(int)((left+right)/2)

		if S[mid]==key:
			if c==0:
				cnt+=1
				c=1
				
			break

		if S[mid]>key:
			right=mid

		if S[mid]<key:
			left=mid+1


print(cnt)

Buggy python submission (verdict: Runtime Error):
sn = int(input())
S = [0 for i in range(sn)]
S = input().split()
for i in range(sn):
	S[i] = int(S[i])

tn = int(input())
T = [0 for i in range(tn)]
T = input().split()
for i in range(tn):
	T[i] = int(T[i])

A=[]
cnt=0

for i in range(tn):

	key=T[i]
	left=0
	right=sn

	while left<right:

		mid=(int)((left+right)/2)

		if S[mid]==key:
			if T[i] not in A:
				cnt+=1
			    A.append(key)
			break

		if S[mid]>key:
			right=mid
			
		if S[mid]<key:
			left=mid+1


print(cnt)


Fixed submission:

sn = int(input())
S = [0 for i in range(sn)]
S = input().split()
for i in range(sn):
	S[i] = int(S[i])

tn = int(input())
T = [0 for i in range(tn)]
T = input().split()
for i in range(tn):
	T[i] = int(T[i])


cnt=0

for i in range(tn):

	key=T[i]
	left=0
	right=sn
	c=0

	while left<right:

		mid=(int)((left+right)/2)

		if S[mid]==key:
			if c==0:
				cnt+=1
				c=1
				
			break

		if S[mid]>key:
			right=mid

		if S[mid]<key:
			left=mid+1


print(cnt)

Buggy python submission (verdict: Runtime Error):
sn = int(input())
S = [0 for i in range(sn)]
S = input().split()
for i in range(sn):
	S[i] = int(S[i])

tn = int(input())
T = [0 for i in range(tn)]
T = input().split()
for i in range(tn):
	T[i] = int(T[i])

A=[]
cnt=0

for i in range(tn):

	key=T[i]
	left=0
	right=sn

	while left<right:

		mid=(int)((left+right)/2)

		if S[mid]==key:
			if T[i] not in A:
				cnt+=1
		    	A.append(key)
			break

		if S[mid]>key:
			right=mid
			
		if S[mid]<key:
			left=mid+1


print(cnt)


Fixed submission:

sn = int(input())
S = [0 for i in range(sn)]
S = input().split()
for i in range(sn):
	S[i] = int(S[i])

tn = int(input())
T = [0 for i in range(tn)]
T = input().split()
for i in range(tn):
	T[i] = int(T[i])


cnt=0

for i in range(tn):

	key=T[i]
	left=0
	right=sn
	c=0

	while left<right:

		mid=(int)((left+right)/2)

		if S[mid]==key:
			if c==0:
				cnt+=1
				c=1
				
			break

		if S[mid]>key:
			right=mid

		if S[mid]<key:
			left=mid+1


print(cnt)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())

s=a*b
sum=a*2+b*2

print(s," ",sum)


Fixed submission:
a,b=map(int,input().split())

s=a*b
sum=a*2+b*2

print(s,sum)
Buggy python submission (verdict: Runtime Error):

def f(x,y):
	list=[0]
	for z in y:
		for i in range(len(list)-1,-1,-1):
			tmp=x.find(z,list[i])+1
			if tmp:
				if i+1 < len(list):
					list[i+1]=min(list[i+1],tmp)
				else:
					list.append(tmp)
	return len(list)-1
 
n=int(input())
for i in range(q):
	x=input()
	y=input()
	print(f(x,y))


Fixed submission:

def f(x,y):
	list=[0]
	for z in y:
		for i in range(len(list)-1,-1,-1):
			tmp=x.find(z,list[i])+1
			if tmp:
				if i+1 < len(list):
					list[i+1]=min(list[i+1],tmp)
				else:
					list.append(tmp)
	return len(list)-1
 
n=int(input())
for i in range(n):
	x=input()
	y=input()
	print(f(x,y))
Buggy python submission (verdict: Runtime Error):

import math

a=int(input())

sum=0

for i in range(n):
	ok=0
	n=int(input())
	if n==2 or n==3:
		sum+=1
	if n>3:
		for j in range(2,int(math.sqrt(n))+1):
			
			if n%j==0:
				ok=1
		if ok==1:
			sum+=1
			
print(sum)


Fixed submission:

import math

n=int(input())

sum=0

for i in range(n):
	b=1
	n=int(input())
	for j in range(2,int(math.sqrt(n))+1):
		if n%j==0:
			b=0
			break
	sum+=b
			
print(sum)

Buggy python submission (verdict: Runtime Error):

import math

a=int(input())

sum=0
ok=0

for i in range(n):
	ok=0
	n=int(input())
	if n==2 or n==3:
		sum+=1
	if n>3:
		for j in range(2,int(math.sqrt(n))+1):
			
			if n%j==0:
				ok=1
		if ok==1:
			sum+=1
			
print(sum)


Fixed submission:

import math

n=int(input())

sum=0

for i in range(n):
	b=1
	n=int(input())
	for j in range(2,int(math.sqrt(n))+1):
		if n%j==0:
			b=0
			break
	sum+=b
			
print(sum)

Buggy python submission (verdict: Runtime Error):

import math

a=int(input())

sum=0

for i in range(n):
	b=1
	n=int(input())
	        for j in range(2,int(math.sqrt(n))+1):
			if n%j==0:
				b=0
				break
		sum+=b
			
print(sum)


Fixed submission:

import math

n=int(input())

sum=0

for i in range(n):
	b=1
	n=int(input())
	for j in range(2,int(math.sqrt(n))+1):
		if n%j==0:
			b=0
			break
	sum+=b
			
print(sum)
Buggy python submission (verdict: Time Limit Exceeded):


n=int(input())

list=[int(input()) for i in range(n)]

max=list[1]-list[0]


for i in range(n-1,-1,-1):
	for j in range(i):
		x=list[i]-list[j]
		if x>max:
			max=x

		
print(max)



Fixed submission:

n=int(input())
a=[int(input()) for i in range(n)]
min1=a[0]
max1=-float('inf')
for i in range(1, n):
    max1=max(a[i]-min1,max1)
    min1=min(a[i],min1)
print(max1)
Buggy python submission (verdict: Runtime Error):
n = int(input())
 
s = set()//集合
for _ in range(n):
    inst = input().split()
    if inst[0] == "insert":
        s.add(inst[1])
    else:
        if inst[1] in s:
            print("yes")
        else:
            print("no")


Fixed submission:
n = int(input())
 
s = set()
for _ in range(n):
    inst = input().split()
    if inst[0] == "insert":
        s.add(inst[1])
    else:
        if inst[1] in s:
            print("yes")
        else:
            print("no")
Buggy python submission (verdict: Runtime Error):

n=int(input())
list1=map(int,input().split())

q=int(input())
list2=map(int,input().split())

for i in range(len(list2)):
	list3=[]
	ok=0
	for j in range(len(list1)):
		if list2[i]<list1[j]:
			list3.append(list1[j])
	for k in range(len(list3)-1):
		if ok==1:
			break
		for l in range(1,len(list3)):
			if list3[k]+list3[l]==list2[i]:
				print("yes")
				ok=1
				break
	if ok==0:
		print("no")


Fixed submission:

import itertools

n=int(input())
list1=list(map(int,input().split()))

q=int(input())
list2=list(map(int,input().split()))

sum1=set()

for i in range(1,n+1):
	x=list(itertools.combinations(list1,i))
	for j in x:
		sum1.add(sum(j))
		
		
for i in list2:
	if i in sum1:
		print("yes")
	else:
		print("no")

Buggy python submission (verdict: Runtime Error):

import itertools

n=int(input())
list1=[int(x) for x in input().split()]

q=int(input())
list2=[int(x) for x in input().split()]

for i in range(len(list2)):
	ok=0
	for j in range(1,len(list1)):
		if ok==1:
			break
		list3=list(itertools.combinations(list1,j))
		for k in range(len(list3)):
			if ok==1:
				break
			if sum(list3[k])==list2[i]:
				print("yes")
				ok=1
				break
	if ok==0:
		print("no")


Fixed submission:

import itertools

n=int(input())
list1=list(map(int,input().split()))

q=int(input())
list2=list(map(int,input().split()))

sum1=set()

for i in range(1,n+1):
	x=list(itertools.combinations(list1,i))
	for j in x:
		sum1.add(sum(j))
		
		
for i in list2:
	if i in sum1:
		print("yes")
	else:
		print("no")
Buggy python submission (verdict: Runtime Error):
x,y=map(int,raw_input().split())


print a*b,(a+b)*2


Fixed submission:
x,y=map(int, input().split())


print(x*y,(x+y)*2)

Buggy python submission (verdict: Runtime Error):
x,y=map(int,raw_input().split())


print a*b,(a+b)*2


Fixed submission:
x,y=map(int, input().split())


print(x*y,(x+y)*2)

Buggy python submission (verdict: Runtime Error):
x,y=map(int,raw_input().split())


print x*y,(x+y)*2


Fixed submission:
x,y=map(int, input().split())


print(x*y,(x+y)*2)

Buggy python submission (verdict: Runtime Error):
x,y=map(int, input().split())


print(x*y,(x+y)*2)


Fixed submission:
x,y=map(int, input().split())


print(x*y,(x+y)*2)
Buggy python submission (verdict: Runtime Error):
while 1:
	s1=input().split('"')
	if s1==".":
		break
	s2=input().split('"')
	
	cnt1=0
	cnt2=0
	i=0
	
	if len(s1)!=len(s2):
		print("DIFFERENT")
	else:
		while i<len(s1):
			if s1[i]==s2[i]:
				cnt1+=1
			elif s1[i]!=s2[i] and i%2==0:
				print("DIFFERENT")
				break
			elif s1[i]!=s2[i] and i%2!=0:
				cnt2+=1
				if cnt2>1:
					print("DIFFERENT")
					break
			i+=1
				
		if cnt2==1:
			print("CLOSE")
		if cnt1==len(s1):
			print("IDENTICAL")


Fixed submission:
while 1:
	s1=input().split('"')
	if s1[0]==".":
		break
	s2=input().split('"')
	
	cnt1=0
	cnt2=0
	flag=0
	
	if len(s1)!=len(s2):
		print("DIFFERENT")
	else:
		i=0
		while i<len(s1):
			if s1[i]==s2[i]:
				cnt1+=1
			elif i%2==0:
				print("DIFFERENT")
				flag=1
				break
			else:
				cnt2+=1
				if cnt2>1:
					print("DIFFERENT")
					break
			i+=1
				
		if flag==0 and cnt2==1:
			print("CLOSE")
		if cnt1==len(s1):
			print("IDENTICAL")
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input().split()
q=int(input())
t=input().split()
cnt=0

for i in range(q):
    for j in range(n):
        if s[i]==t[j]:
            cnt+=1
            break
            
print(cnt)


Fixed submission:
n=int(input())
s=input().split()
q=int(input())
t=input().split()
cnt=0

for i in range(q):
    for j in range(n):
        if s[j]==t[i]:
            cnt+=1
            break
            
print(cnt)