Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
A,B,C,X,Y=(int(i) for i in input().split())
 
if A+B<2*C:
  print(A*X+B*Y)
  
elif min(X,Y)<=2*C:
  if X>Y:
    print((X-Y)*A+2*Y*C)
  else:
    print((Y-X)*B+2*X*C)
elif A<=B:
  if X>Y:
    print(2*C*Y+(X-Y)*A)
  else:
    orint(2*C*Y)
else:
  if X<Y:
    print(2*C*X+(Y-X)*B)
  else:
    print(2*C*X)
  
  for i in range(print(2*C*max(X,Y))
        

Fixed submission:
N,X=(int(i) for i in input().split())
L=[int(input()) for i in range(N)]
L.sort()
a=sum(L)
print(N+(X-a)//L[0])
Buggy python submission (verdict: Runtime Error):
N=int(input())
L=[int(i) for i in input().split()]
L1=sorted(L)
a=L1[N//2]
b=L1[N//2-1]
for i in range(N):
  if L[i]<a:
    print(a)
  else:
    print(b)

Fixed submission:
N,M,X=(int(i) for i in input().split())
L=[int(i) for i in input().split()]
a=0
b=0
for i in range(M):
  if L[i]<X:
    a+=1
  else:
    b+=1
print(min(a,b))

Buggy python submission (verdict: Runtime Error):
N,M,X=(int(i) for i in input().split())
L=[int(input()) for i in range(M)]
a=0
b=0
for i in range(M):
  if L[i]<X:
    a+=1
  else:
    b+=1
print(min(a,b))


Fixed submission:
N,M,X=(int(i) for i in input().split())
L=[int(i) for i in input().split()]
a=0
b=0
for i in range(M):
  if L[i]<X:
    a+=1
  else:
    b+=1
print(min(a,b))
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
L=[int(i) for i in input().split()]
L1=sorted(L)
a=L[N//2]
b=L[N//2-1]
 
for i in range(N):
  L2=L1[:]
  L2.remove(L[i])
  print(L2[N//2-1])


Fixed submission:
N=int(input())
L=[int(i) for i in input().split()]
L1=sorted(L)
a=L1[N//2]
b=L1[N//2-1]
for i in range(N):
  if L[i]<a:
    print(a)
  else:
    print(b)
Buggy python submission (verdict: Runtime Error):
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>a:
  for i in L:
    print(i)
else:
  S=list(set(L[:K]+L[a-K:a]))
  S.sort()
  for i in S:
    print(i)

Fixed submission:
A,B,K=(int(i) for i in input().split())
a=B-A+1
if K>=a:
  for i in range(A,B+1):
    print(i)
else:
  L1=list(range(A,A+K))
  L2=list(range(B-K+1,B+1))
  S=list(set(L1+L2))
  S.sort()
  for i in S:
    print(i)

Buggy python submission (verdict: Runtime Error):
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>=a:
  for i in L:
    print(i)
else:
  S=list(set(L[:K]+L[a-K:a]))
  S.sort()
  for i in S:
    print(i)

Fixed submission:
A,B,K=(int(i) for i in input().split())
a=B-A+1
if K>=a:
  for i in range(A,B+1):
    print(i)
else:
  L1=list(range(A,A+K))
  L2=list(range(B-K+1,B+1))
  S=list(set(L1+L2))
  S.sort()
  for i in S:
    print(i)

Buggy python submission (verdict: Runtime Error):
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>=a:
  for i in range(a):
    print(L[i])
else:
  S=list(set(L[:K]+L[a-K:a]))
  S.sort()
  for i in S:
    print(i)

Fixed submission:
A,B,K=(int(i) for i in input().split())
a=B-A+1
if K>=a:
  for i in range(A,B+1):
    print(i)
else:
  L1=list(range(A,A+K))
  L2=list(range(B-K+1,B+1))
  S=list(set(L1+L2))
  S.sort()
  for i in S:
    print(i)

Buggy python submission (verdict: Runtime Error):
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>=a:
  for i in range(a):
    print(L[i])
else:
  S=list(set(L[:K]+L[a-K:a]))
  S.sort()
  for i in range(len(S)):
    print(S[i])

Fixed submission:
A,B,K=(int(i) for i in input().split())
a=B-A+1
if K>=a:
  for i in range(A,B+1):
    print(i)
else:
  L1=list(range(A,A+K))
  L2=list(range(B-K+1,B+1))
  S=list(set(L1+L2))
  S.sort()
  for i in S:
    print(i)

Buggy python submission (verdict: Runtime Error):
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>=a:
  for i in range(a):
    print(L[i])
else:
  S=list(set(L[:K]+L[a-K:a]))
  S.sort()
  for i in range(len(S)):
    print(S[i])

Fixed submission:
A,B,K=(int(i) for i in input().split())
a=B-A+1
if K>=a:
  for i in range(A,B+1):
    print(i)
else:
  L1=list(range(A,A+K))
  L2=list(range(B-K+1,B+1))
  S=list(set(L1+L2))
  S.sort()
  for i in S:
    print(i)

Buggy python submission (verdict: Runtime Error):
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>=a:
  for i in range(a):
    print(L[i])
else:
  S=list(set(L[:K])&set(L[a-K:a]))[:]
  for i in range(len(S)):
    print(S[i])

Fixed submission:
A,B,K=(int(i) for i in input().split())
a=B-A+1
if K>=a:
  for i in range(A,B+1):
    print(i)
else:
  L1=list(range(A,A+K))
  L2=list(range(B-K+1,B+1))
  S=list(set(L1+L2))
  S.sort()
  for i in S:
    print(i)
Buggy python submission (verdict: Runtime Error):
def counting (l,s):
  for i in range(len(l)):
    A.append(l.count(l[i])-s.count(l[i]))
N=int(input())
L=[input() for i in range(N)]
M=int(input())
S=[input() for i in range(M)]
A=[0]
counting(L,S)
print(max(A))

Fixed submission:
a,b,c=(int(i) for i in input().split())
if a+b>=c:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):

N=int(input())
L=[input() for i in range(N)]
M=int(input())
S=[input() for i in range(M)]
A=[0]
for i in range(N):
  A.append(L.count(L[i])-S.count(S[i]))

print(max(A))

Fixed submission:
N=int(input())
L=[input() for i in range(N)]
M=int(input())
S=[input() for i in range(M)]
A=[0]
for i in range(N):
  A.append(L.count(L[i])-S.count(L[i]))
 
print(max(A))
Buggy python submission (verdict: Runtime Error):
N-int(input())
print(N//3)

Fixed submission:
N=int(input())
print(N//3)
Buggy python submission (verdict: Runtime Error):
def judge(t,x,y,t0,x0,y0):
  minT=abs(x-x0)+abs(y-y0)
  return (t-t0-minT)>=0 and (t-t0-minT)%2==0
n=int(input())
lst=[tuple(int(i) for i in input().split()) for i in range(n)]
t0=0;x0=0;y0=0
num=0;bool=False
while num<=n-1:
  t,x,y=lst[num]
  if judge(t,x,y,t0,x0,y0):
    t0=t;x0=x;y0=y
    t,x,y=lst[num+1]
    num+=1
    bool=True
  else:
    bool=False
    break
if bool:
  print('Yes')
else:
  print('No')


Fixed submission:
def judge(t,x,y,t0,x0,y0):
  minT=abs(x-x0)+abs(y-y0)
  if (t-t0-minT)>=0 and (t-t0-minT)%2==0:
    return True
  else:
    return False
n=int(input())
lst=[tuple(int(i) for i in input().split()) for i in range(n)]
t0=0;x0=0;y0=0
for i in range(n):
  t,x,y=lst[i]
  if judge(t,x,y,t0,x0,y0):
    t0=t;x0=x;y0=y
    ans=True
  else:
    ans=False
    break
if ans:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
def judge(t,x,y,t0,x0,y0):
  minT=abs(x-x0)+abs(y-y0)
  return (t-t0-minT)>=0 and (t-t0-minT)%2==0
n=int(input())
lst=[tuple(int(i) for i in input().split()) for i in range(n)]
t0=0;x0=0;y0=0
num=0;bool=False
while num<=n:
  t,x,y=lst[num]
  if judge(t,x,y,t0,x0,y0):
    t0=t;x0=x;y0=y
    num+=1
    bool=True
  else:
    bool=False
    break
if bool:
  print('Yes')
else:
  print('No')


Fixed submission:
def judge(t,x,y,t0,x0,y0):
  minT=abs(x-x0)+abs(y-y0)
  if (t-t0-minT)>=0 and (t-t0-minT)%2==0:
    return True
  else:
    return False
n=int(input())
lst=[tuple(int(i) for i in input().split()) for i in range(n)]
t0=0;x0=0;y0=0
for i in range(n):
  t,x,y=lst[i]
  if judge(t,x,y,t0,x0,y0):
    t0=t;x0=x;y0=y
    ans=True
  else:
    ans=False
    break
if ans:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
def judge(t,x,y,t0,x0,y0):
  minT=abs(x-x0)+abs(y-y0)
  return (t-t0-minT)>=0 and (t-t0-minT)%2==0
n=int(input())
lst=[tuple(int(i) for i in input().split()) for i in range(n)]
t0=0;x0=0;y0=0
num=0;bool=False
while num<=n:
  t,x,y=lst[num]
  if judge(t,x,y,t0,x0,y0):
    t0=t;x0=x;y0=y
    t,x,y=lst[num+1]
    num+=1
    bool=True
  else:
    bool=False
    break
if bool:
  print('Yes')
else:
  print('No')

Fixed submission:
def judge(t,x,y,t0,x0,y0):
  minT=abs(x-x0)+abs(y-y0)
  if (t-t0-minT)>=0 and (t-t0-minT)%2==0:
    return True
  else:
    return False
n=int(input())
lst=[tuple(int(i) for i in input().split()) for i in range(n)]
t0=0;x0=0;y0=0
for i in range(n):
  t,x,y=lst[i]
  if judge(t,x,y,t0,x0,y0):
    t0=t;x0=x;y0=y
    ans=True
  else:
    ans=False
    break
if ans:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
S=input()
ass=True
for i in range(len(S)):
  if i==A:
    if S[i]!='-':
      ass=False
      break
  else:
    if S[i]=='-':
      ass=False
      break
if ass:
  print('Yes')
else:
  print('No')


Fixed submission:
n=int(input())
a=24-n
print(24+a)

Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
S=input()
ass=True
for i in range(len(S)):
  if i==A:
    if S[i]!='-':
      ass=False
      break
  else:
    if S[i]=='-':
      ass=False
      break
if ass:
  print('Yes')
else:
  print('No')


Fixed submission:
n=int(input())
a=24-n
print(24+a)
Buggy python submission (verdict: Runtime Error):
N=int(input())
lst=[int(i) for i in input().split()]
for i in range(n):
  lst[i]=lst[i]//2
print(min(ans))
  

Fixed submission:
n=int(input())
lst=[int(i) for i in input().split()]
ans=[0]*n
for i in range(n):
  while lst[i]%2==0:
    lst[i]=lst[i]//2
    ans[i]+=1
print(min(ans))
Buggy python submission (verdict: Runtime Error):
import math
a,b,c=map(int,input(),split())
a-=c
print(math.floor(a/(b+c))

Fixed submission:
import math
a,b,c=map(int,input().split())
a-=c
print(math.floor(a/(b+c)))
Buggy python submission (verdict: Runtime Error):
h,w=map(int,input().split())
l=[[0]*(w+2)]
for i in range(h):
  a=list(input())
  a.insert(0,0)
  a.append(0)
  l.append(a)
l.append([0]*(w+2))
pointx=[-1,0,1]
pointy=[-1,0,1]
for i in range(1,h+1):
  for j in range(1,w+1):
    if l[i][j]=='.':
      count=0
      for k in pointx:
        for m in pointy:
          if l[i+k][i+m]=='#':
            count+=1
      l[i][j]=str(count)

del l[0]
del l[h]
for i in range(h):
  l[i]=l[i][1:w+1]
for i in l:
  print(''.join(i))

Fixed submission:
h,w=map(int,input().split())
l=[[0]*(w+2)]
for i in range(h):
  a=list(input())
  a.insert(0,0)
  a.append(0)
  l.append(a)
l.append([0]*(w+2))
pointx=[-1,0,1]
pointy=[-1,0,1]
for i in range(1,h+1):
  for j in range(1,w+1):
    if l[i][j]=='.':
      count=0
      for k in pointx:
        for m in pointy:
          if l[i+k][j+m]=='#':
            count+=1
      l[i][j]=str(count)

del l[0]
del l[h]
for i in range(h):
  l[i]=l[i][1:w+1]
for i in l:
  print(''.join(i))

Buggy python submission (verdict: Runtime Error):
h,w=map(int,input().split())
l=[[0]*(w+2)]
for i in range(h):
  a=list(input())
  a.insert(0,0)
  a.append(0)
  l.append(a)
l.append([0]*(w+2))
pointx=[-1,0,1]
pointy=[-1,0,1]
for i in range(1,h+1):
  for j in range(1,w+1):
    count=0
    if l[i][j]=='.':
      for k in pointx:
        for m in pointy:
          if l[i+k][i+m]=='#':
            count+=1
      l[i][j]=str(count)

del l[0]
del l[h]
for i in range(h):
  l[i]=l[i][1:w+1]
for i in l:
  print(''.join(i))

Fixed submission:
h,w=map(int,input().split())
l=[[0]*(w+2)]
for i in range(h):
  a=list(input())
  a.insert(0,0)
  a.append(0)
  l.append(a)
l.append([0]*(w+2))
pointx=[-1,0,1]
pointy=[-1,0,1]
for i in range(1,h+1):
  for j in range(1,w+1):
    if l[i][j]=='.':
      count=0
      for k in pointx:
        for m in pointy:
          if l[i+k][j+m]=='#':
            count+=1
      l[i][j]=str(count)

del l[0]
del l[h]
for i in range(h):
  l[i]=l[i][1:w+1]
for i in l:
  print(''.join(i))
Buggy python submission (verdict: Runtime Error):
n=int(input())
ans=0
for i in range(n):
  r,l=int(i) for i in input().split()
  ans+=l-r+1
print(ans)

Fixed submission:
n=int(input())
ans=0
for i in range(n):
  r,l=(int(i) for i in input().split())
  ans+=l-r+1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
def main():
  n=int(input())
  ans=0
  l=[10**9+1]
  import bisect
  for i in range(n):
    a=int(input())
    num=bisect.bisect_left(l,a)
    if l[num]==a:
      ans-=1
      del l[num]
    else:
      l.append(a)
      l.sort()
      ans+=1
  print(ans)
if __name__=='__main__':
  main()


Fixed submission:
n=int(input())
ans=0
l=[int(input()) for i in range(n)]
from collections import Counter
lst=list(Counter(l).values())
def mod2(n):
  if n%2==1:
    return 1
  else:
    return 0
ans=0
for i in lst:
  ans+=mod2(i)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
ans=0
l=[10**9+1]
import bisect
for i in range(n):
  a=int(input())
  num=bisect.bisect_left(l,a)
  if l[num]==a:
    ans-=1
    del l[num]
  else:
    l.append(a)
    l.sort()
    ans+=1
print(ans)


Fixed submission:
n=int(input())
ans=0
l=[int(input()) for i in range(n)]
from collections import Counter
lst=list(Counter(l).values())
def mod2(n):
  if n%2==1:
    return 1
  else:
    return 0
ans=0
for i in lst:
  ans+=mod2(i)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
ans=0
l=[10**9+1]
import bisect
for i in range(n):
  a=int(input())
  num=bisect.bisect_left(l,a)
  if l[num]==a:
    ans-=1
    l.remove(a)
  else:
    l.append(a)
    l.sort()
    ans+=1
print(ans)


Fixed submission:
n=int(input())
ans=0
l=[int(input()) for i in range(n)]
from collections import Counter
lst=list(Counter(l).values())
def mod2(n):
  if n%2==1:
    return 1
  else:
    return 0
ans=0
for i in lst:
  ans+=mod2(i)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
ans=0
l=[]
for i in range(n):
  a=int(input())
  if a in l:
    ans-=1
    l.remove(a)
  else:
    l.append(a)
    ans+=1
print(ans)

Fixed submission:
n=int(input())
ans=0
l=[int(input()) for i in range(n)]
from collections import Counter
lst=list(Counter(l).values())
def mod2(n):
  if n%2==1:
    return 1
  else:
    return 0
ans=0
for i in lst:
  ans+=mod2(i)
print(ans)
Buggy python submission (verdict: Runtime Error):
l=[chr(i) for i in range(97,97+26)]
s=list(input())
a=set(l)-set(s)
a=list(a)
a.sort()
print(a[0])


Fixed submission:
l=[chr(i) for i in range(97,97+26)]
s=list(input())
a=set(l)-set(s)
a=list(a)
a.sort()
if len(a)>0:
  print(a[0])
else:
  print('None')
Buggy python submission (verdict: Runtime Error):
n=int(input())
l=[int(i) for i in input().split()]
from collections import Counter
import math
lst=list(Counter(l).items())
lst.sort(reverse=True)
num=0
for i in range(n):
    if lst[i][1]>3:
        if num==0:
            ans=lst[i][0]**2
            break
        elif num==1:
            ans*=lst[i]
            num+=1
            break
    elif 1<lst[i][1]<=3:
        if num==0:
            ans=lst[i][0]
            num+=1
        elif num==1:
            ans*=lst[i][0]
            num+=1
            break
    else:
        continue
if num==2:
    print(ans)
else:
    print(0)

Fixed submission:
n=int(input())
l=[int(i) for i in input().split()]
from collections import Counter
lst=list(Counter(l).items())
lst.sort(reverse=True)
num=0
for i in range(n):
    if lst[i][1]>3:
        if num==0:
            ans=lst[i][0]**2
            num+=2
            break
        elif num==1:
            ans*=lst[i][0]
            num+=1
            break
    elif 1<lst[i][1]<=3:
        if num==0:
            ans=lst[i][0]
            num+=1
        elif num==1:
            ans*=lst[i][0]
            num+=1
            break
    else:
        continue
if num==2:
    print(ans)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
n=int(input())
l=[int(i) for i in input().split()]
l.sort(reverse=True)
num=0
d=0
ans=1
A=False
while d<n:
  if l[d]==l[d+1]:
    ans*=l[d]
    num+=1
    i
    d=d+2
  if num==2:
    A=True
    break
if A:
  print(ans)
else:
  print(0)
    

Fixed submission:
n=int(input())
l=[int(i) for i in input().split()]
from collections import Counter
lst=list(Counter(l).items())
lst.sort(reverse=True)
num=0
for i in range(n):
    if lst[i][1]>3:
        if num==0:
            ans=lst[i][0]**2
            num+=2
            break
        elif num==1:
            ans*=lst[i][0]
            num+=1
            break
    elif 1<lst[i][1]<=3:
        if num==0:
            ans=lst[i][0]
            num+=1
        elif num==1:
            ans*=lst[i][0]
            num+=1
            break
    else:
        continue
if num==2:
    print(ans)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
N=int(input())
lst=[int(i) for i in input().split()]
import numpy
res=numpy.cumsum(lst)
ans=10e10
for i in range(N):
  ans=min(ans,abs(res[i]-(res[-1]-res[i])))
print(ans)

Fixed submission:
a,b=map(int,input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
  print('Possible')
else:
  print('Impossible')
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
l=[(int(i) for i in input().split())]
l.sort(reverse=True)
print(sum(l[:k]))


Fixed submission:
n,k=map(int,input().split())
l=[int(i) for i in input().split()]
l.sort(reverse=True)
print(sum(l[:k]))

Buggy python submission (verdict: Runtime Error):
n,k=map(inr,input().split())
l=[(int(i) for i in input().split())]
l.sort(reverse=True)
print(sum(l[:k]))

Fixed submission:
n,k=map(int,input().split())
l=[int(i) for i in input().split()]
l.sort(reverse=True)
print(sum(l[:k]))
Buggy python submission (verdict: Runtime Error):
N=int(input())
lst=[int(i) for i in input().split()]
import numpy
res=numpy.cumsum(lst)
ans=10e10
for i in range(N):
  ans=min(ans,abs(res[i]-(res[-1]-res[i]))
print(ans)
  

Fixed submission:
N=int(input())
lst=[int(i) for i in input().split()]
import numpy
res=numpy.cumsum(lst)
ans=10e20
for i in range(N-1):
  ans=min(ans,abs(res[i]-(res[-1]-res[i])))
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=[int(i) for i in input().split()]
b=[]
if n%2==0:
    for i in range(n//2):
        b.append(l[2*i])
        b.insert(0,l[2*i+1])
else:
    for i in range(n//2):
        b.insert(0,l[2*i])
        b.append(l[2*i+1])
    b.insert(0,l[-1])
for i in b:
    print(i,end=' ')

Fixed submission:
n=int(input())
l=[int(i) for i in input().split()]
if n%2==0:
  a=[l[2*i] for i in range(n//2)]
  b=[l[2*i+1] for i in range(n//2)]
  b=b[::-1]
  c=b+a
  for i in c:
    print(i,end=' ')
else:
  a=[l[2*i] for i in range(n//2+1)]
  b=[l[2*i+1] for i in range(n//2)]
  a=a[::-1]
  c=a+b
  for i in c:
    print(i,end=' ')
Buggy python submission (verdict: Runtime Error):
x,a,b=map(int,input()/split())
if b>=a:
    print('delicious')
elif a-b<=x:
    print('safe')
else:
    print('dangerous')


Fixed submission:
x,a,b=map(int,input().split())
if a>=b:
    print('delicious')
elif (b-a)<=x:
    print('safe')
else:
    print('dangerous')
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=[int(input()) for i in range(n)]
a=1
ans=0
while a!=2:
    a=l[a-1]
    ans+=1
    if a==1:
        ans=-1
        break
print(ans)
    

Fixed submission:
n=int(input())
l=[int(input()) for i in range(n)]
a=1
ans=0
while a!=2:
    a=l[a-1]
    ans+=1
    if ans==n+1:
        ans=-1
        break
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from math import factorial
n,m=map(int,input().split())
if n==m:
    print(2*factorial(n)*factorial(m))
elif n==m+1 or m==n+1:
        print(factorial(n)*factorial(m))
else:
    print(0)
    

Fixed submission:
import sys
sys.setrecursionlimit(10**7)
n,m=map(int,input().split())
def fact(n):
    mod=10**9+7
    if n==0:
        return 1
    else:
        return (n*fact(n-1))%mod
mod=10**9+7
if n==m:
    print(2*fact(n)*fact(m)%mod)
elif n==m+1 or m==n+1:
        print(fact(n)*fact(m)%mod)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
d=a%b
e=a//d+1
for i in range(e):
    if (i*d)%b==c:
        A=True
        break
    else:
        A=False
if A:
    print('YES')
else:
    print('NO')

Fixed submission:
a,b,c=map(int,input().split())
d=a%b
if d==0:
    if c==0:
        A=True
    else:
        A=False
else:
    for i in range(1,max(a,b)):
        if (i*d)%b==c:
            A=True
            break
        else:
            A=False
if A:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=m//2
if n>a:
    print(a)
else:
    print((n+a)//2)


Fixed submission:
mod=10**9+7
n=int(input())
ans=1
for i in range(1,n+1):
    ans=(ans*i)%mod
print(ans)
Buggy python submission (verdict: Runtime Error):
X = int(input(7))
A = int(input(4))
 
if X < A:
 print(0)
else:
 print(10)

Fixed submission:
X, A = map(int, input().split())
 
if X < A:
 print(0)
else:
 print(10)

Buggy python submission (verdict: Runtime Error):
X = int(input())
A = int(input())

if X < A:
 print(0)
else:
 print(10)

Fixed submission:
X, A = map(int, input().split())
 
if X < A:
 print(0)
else:
 print(10)

Buggy python submission (verdict: Runtime Error):
3 5
 
if X < A:
 print(0)
else:
 print(10)

Fixed submission:
X, A = map(int, input().split())
 
if X < A:
 print(0)
else:
 print(10)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
 
X = input()
A = input()
 
if X < A:
 print(0)
else:
 print(10)

Fixed submission:
X, A = map(int, input().split())
 
if X < A:
 print(0)
else:
 print(10)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

if X < A:
　print('0')
else:
　print('10')

Fixed submission:
X, A = map(int, input().split())
 
if X < A:
 print(0)
else:
 print(10)

Buggy python submission (verdict: Runtime Error):
X = input()
A = input()

if X < A:
　print('0')
else:
　print('10')


Fixed submission:
X, A = map(int, input().split())
 
if X < A:
 print(0)
else:
 print(10)

Buggy python submission (verdict: Runtime Error):
if X < A:
　print('0')
else:
　print('10')

Fixed submission:
X, A = map(int, input().split())
 
if X < A:
 print(0)
else:
 print(10)

Buggy python submission (verdict: Runtime Error):
if X < A:
    print(0)
else:
    print(10)

Fixed submission:
X, A = map(int, input().split())
 
if X < A:
 print(0)
else:
 print(10)

Buggy python submission (verdict: Runtime Error):
if X < A:
    print('0')
else:
    print('10')

Fixed submission:
X, A = map(int, input().split())
 
if X < A:
 print(0)
else:
 print(10)

Buggy python submission (verdict: Runtime Error):
X = input()
A = input()

if X < A:
    print('0')
else:
    print('10')

Fixed submission:
X, A = map(int, input().split())
 
if X < A:
 print(0)
else:
 print(10)

Buggy python submission (verdict: Runtime Error):
w,h,x,y=map(int,input().split())
if w%2==0 and h%2==0:
    print(x*h,1) 
elif w%2==0:
    print(x*h,0)
elif h%2==0:
    print(y*w,0)
elif w%2!=0 and h%2!=0:
    print(w*h/2,0)

Fixed submission:
x,a=map(int,input().split())
print(0 if x<a else 10)

Buggy python submission (verdict: Runtime Error):
w,h,x,y=map(int,input().split())
if w%x==0 and h%y==0:
    print(x*h) 
    print(1)
elif w%x==0:
    print(x*h)
    print(0)
elif w%x!=0:
    print(y*w)
    print(0)
else:
    print(w*h/2)
    print(0)

Fixed submission:
x,a=map(int,input().split())
print(0 if x<a else 10)
Buggy python submission (verdict: Runtime Error):

P=int(input())
Q=int(input())
R=int(input())

if P+Q<=Q+R:
    if P+Q<=R+P:
        print(P+Q)
    else:
        print(R+P)
elif Q+R<P+Q:
    if Q+R<=R+P:
        print(Q+R)
    else:
        print(R+P)

Fixed submission:
p,q,r = map(int, input().split())
print(min(p+q,q+r,r+p))

Buggy python submission (verdict: Runtime Error):
P=int(input())
Q=int(input())
R=int(input())
a=P+Q
b=Q+R
c=R+P

if a<=b:
    if a<=c:
        print(a)
    else:
        print(c)
elif b<a:
    if b<=c:
        print(b)
    else:
        print(c)

Fixed submission:
p,q,r = map(int, input().split())
print(min(p+q,q+r,r+p))

Buggy python submission (verdict: Runtime Error):
P=input()
Q=input()
R=input()
p=int(P)
q=int(Q)
r=int(R)
a=p+q
b=q+r
c=r+p

if a<=b:
    if a<=c:
        print(a)
    else:
        print(c)
elif b<a:
    if b<=c:
        print(b)
    else:
        print(c)


Fixed submission:
p,q,r = map(int, input().split())
print(min(p+q,q+r,r+p))

Buggy python submission (verdict: Runtime Error):
P=input()
Q=input()
R=input()
p=int(P)
q=int(Q)
r=int(R)
a=p+q
b=q+r
c=r+p

if a<=b:
    if a<=c:
        print(a)
    else:
        print(c)
elif b<=a:
    if b<=c:
        print(b)
    else:
        print(c)


Fixed submission:
p,q,r = map(int, input().split())
print(min(p+q,q+r,r+p))
Buggy python submission (verdict: Runtime Error):
W,H=map(int,input())
w,h=map(int,input())
print(W*H-(h*W+w*H-w*h))

Fixed submission:
W,H=map(int,input().split())
w,h=map(int,input().split())
print(W*H-(h*W+w*H-w*h))