Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
from decimal import Decimal
a,b=input().split()
a=decimal(a)
b=decimal(b)
print(a*b)

Fixed submission:
from decimal import Decimal
a,b=input().split()
a=Decimal(a)
b=Decimal(b)
print((a*b)//1)

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

Fixed submission:
from decimal import Decimal
a,b=input().split()
a=Decimal(a)
b=Decimal(b)
print((a*b)//1)
Buggy python submission (verdict: Runtime Error):
N=int(input())

x=N%10
if X==3:
  print('bon')

elif x==0:
  print('pon')

elif x==1:
  print('pon')

elif x==6:
  print('pon')

elif x==8:
  print('pon')
  
else:
  print('hon')


Fixed submission:
N=int(input())

x=N%10
if x==3:
  print('bon')

elif x==0 or x==1 or x==6 or x==8:
  print('pon')

else:
  print('hon')

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

x=N%10
if X==3:
  print('bon')

elif x==0 or x==1 or x==6 or x==8:
  print('pon')

else:
  print('hon')

Fixed submission:
N=int(input())

x=N%10
if x==3:
  print('bon')

elif x==0 or x==1 or x==6 or x==8:
  print('pon')

else:
  print('hon')
Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
lst=[[] for i in range(n)]
visited=[False for i in range(n)]
ans=[0]*n

for i in range(m):
      a,b=map(int,input().split())
      lst[a-1].append(b-1)
      lst[b-1].append(a-1)

Q=[0]
visited[0]=True

while Q:
  v=Q.pop(0)
  for i in lst[v]:
        if visited[i]==False:
              visited[i]=True
              ans[i]=v
              Q.append(i)

print('Yes')

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

Fixed submission:
n,m=map(int,input().split())
lst=[[] for i in range(n)]
visited=[False for i in range(n)]
ans=[0]*n

for i in range(m):
      a,b=map(int,input().split())
      lst[a-1].append(b-1)
      lst[b-1].append(a-1)

Q=[0]
visited[0]=True

while Q:
  v=Q.pop(0)
  for i in lst[v]:
        if visited[i]==False:
              visited[i]=True
              ans[i]=v
              Q.append(i)

print('Yes')

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

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
lst=[[] for i in range(n)]
visited=[True]+[False]*(n-1)
ans=[0]*n

for i in range(m):
      a,b=map(int,input().split())
      lst[a-1].append(b-1)
      lst[b-1].append(a-1)

Q=[0]

While Q:
  v=Q.pop(0)
  for i in lst[v]:
        if visited[i]==False:
              visited[i]=True
              ans[i]=v
              Q.append(v)

print('Yes')

for i in range(1,n):
      print(ans[i])

Fixed submission:
n,m=map(int,input().split())
lst=[[] for i in range(n)]
visited=[False for i in range(n)]
ans=[0]*n

for i in range(m):
      a,b=map(int,input().split())
      lst[a-1].append(b-1)
      lst[b-1].append(a-1)

Q=[0]
visited[0]=True

while Q:
  v=Q.pop(0)
  for i in lst[v]:
        if visited[i]==False:
              visited[i]=True
              ans[i]=v
              Q.append(i)

print('Yes')

for i in range(1,n):
      print(ans[i]+1)
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
a=list(map(int,input().split()))

now=1
visited=[1]

for i in range(k):
  now=a[now-1]
  if now in visited:
    for j in range(1,len(visited)+1):
      if visited[-j]==now:
        t=j
        for i in range(((k-(len(visited)-j))%t)):
          now=a[now-1]
        print(now)
        exit()
  
  visited.append(now)
        
print(now)

Fixed submission:
n,k=map(int,input().split())
a=list(map(int,input().split()))

now=0
visited=set()
visited.add((0))
visited2=[0]


while True:
  k-=1
  now=a[now]-1

  if k==0:
    print(now+1)
    exit()

  
  if now in visited:
    visited.add((now))
    visited2.append(now)
    break

  visited.add((now))
  visited2.append(now)


xxx=visited2[-1]
cnt=[]
for i in range(len(visited2)):
  if visited2[i]==xxx:
    cnt.append(i)


k%=cnt[1]-cnt[0]


if k!=0:
  for i in range(k):
    now=a[now]-1
  

print(now+1)

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
a=list(map(int,input().split()))

now=1
visited=[1]

for i in range(k):
  now=a[now-1]
  if now in visited:
    for j in range(1,len(visited)+1):
      if visited[-j]==now:
        t=j
        for i in range((k-(len(visited)-j)%t)):
          now=a[now-1]
        print(now)
        exit()
  
  visited.append(now)
        
print(now)

Fixed submission:
n,k=map(int,input().split())
a=list(map(int,input().split()))

now=0
visited=set()
visited.add((0))
visited2=[0]


while True:
  k-=1
  now=a[now]-1

  if k==0:
    print(now+1)
    exit()

  
  if now in visited:
    visited.add((now))
    visited2.append(now)
    break

  visited.add((now))
  visited2.append(now)


xxx=visited2[-1]
cnt=[]
for i in range(len(visited2)):
  if visited2[i]==xxx:
    cnt.append(i)


k%=cnt[1]-cnt[0]


if k!=0:
  for i in range(k):
    now=a[now]-1
  

print(now+1)
Buggy python submission (verdict: Runtime Error):
s=input()
if s==ABC:
  print('ARC')

elif s==ARC:
  print('ABC')
  

Fixed submission:
s=input()
if s=='ABC':
  print('ARC')

elif s=='ARC':
  print('ABC')
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
lst=[for _ in range(1,n+1)]
for i in range(k):
  x=int(input())
  a=list(map(int,input().split()))
  b=set(a)
  for j in b:
    lst.remove(j)
print(len(lst))

Fixed submission:
n,k=map(int,input().split())
lst=[_ for _ in range(1,n+1)]
for i in range(k):
  x=int(input())
  a=list(map(int,input().split()))
  b=set(a)
  for j in b:
    if j in lst:
      lst.remove(j)
print(len(lst))

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
list=[1:n+1]
for i in range(k):
  d=int(input())
  a=list(map(int,input.split()))
  list.remove(a)
print(count(list))

Fixed submission:
n,k=map(int,input().split())
lst=[_ for _ in range(1,n+1)]
for i in range(k):
  x=int(input())
  a=list(map(int,input().split()))
  b=set(a)
  for j in b:
    if j in lst:
      lst.remove(j)
print(len(lst))
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
ans=0

plus=[0]*1000000
minus=[0]*1000000

for i in range(n):
  ene=i+1
  pin=a[i]
  pl,mi=ene+pin,ene-pin
  plus[pl]+=1
  minus[mi]+=1
  
for i in range(1000000):
  ans+=plus[i]*minus[i]
  

print(ans)


Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=0

plus=[0]*1000000
minus=[0]*1000000

for i in range(n):
  ene=i+1
  pin=a[i]
  pl,mi=ene+pin,ene-pin
  if 0<=pl<1000000:
    plus[pl]+=1
  if 0<=mi<1000000:
    minus[mi]+=1
  
for i in range(1000000):
  ans+=plus[i]*minus[i]
  

print(ans)
Buggy python submission (verdict: Runtime Error):
k=int(input())
a,b=map(int,input().split())
for i in range(a,b+1):
  if i%k==0:
    print 'OK'
  
  else:
    print 'NG'

Fixed submission:
k=int(input())
a,b=map(int,input().split())
ans='NG'
if b-a-1>=k:
  ans='OK'
else:
  for i in range(a,b+1):
    if i%k==0:
      ans='OK'
      break
print(ans)
Buggy python submission (verdict: Runtime Error):
x=int(input())
money=100
i=0
while true:
  money*1.01
  i+=1
  if money>=x:
    break
print i

Fixed submission:
x=int(input())
total=100
years=0
while total<x:
  total*=1.01
  years+=1
  total=int(total)
print(years)
Buggy python submission (verdict: Runtime Error):
import mathmatics
r=int(input())
print(2*r*pi)

Fixed submission:
r=int(input())
print(2*r*3.1415926535237)
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=list(map,int().input())
x=sum(a)
if n<x:
  print('-1')
else:
  print(n-x)

Fixed submission:
n,m=map(int,input().split())
a=list(map(int,input().split()))
x=sum(a)
if n<x:
  print('-1')
else:
  print(n-x)

Buggy python submission (verdict: Runtime Error):
N,M=map(int,input().split())
A=list(map(int,input().split()))

sum=sum(A)

if N>=sum:
  print('N-sum')
else('-1')


Fixed submission:
n,m=map(int,input().split())
a=list(map(int,input().split()))
x=sum(a)
if n<x:
  print('-1')
else:
  print(n-x)

Buggy python submission (verdict: Runtime Error):
N,M=map(int,input().split())
A=list(map(int,input().split()))

sum=sum(A)

if N>=sum:
  print(N-sum)
else(-1)

Fixed submission:
n,m=map(int,input().split())
a=list(map(int,input().split()))
x=sum(a)
if n<x:
  print('-1')
else:
  print(n-x)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
for i in range(1,n+1):
  print(a.count(i))

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
x=[0]*n
for i in a:
  x[i-1]+=1
for i in x:
  print(i)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
  print(a.count(i+1)) 


Fixed submission:
n=int(input())
a=list(map(int,input().split()))
x=[0]*n
for i in a:
  x[i-1]+=1
for i in x:
  print(i)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
  print(a.count(i+1)) 

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
x=[0]*n
for i in a:
  x[i-1]+=1
for i in x:
  print(i)
Buggy python submission (verdict: Runtime Error):
mod=10**9+7
x=[0]+[0]
for i in range(1,2*10**5):
  x.append((x[-1]+i)%mod)

ans=0


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


for i in range(k,n+2):
  ans+=(i*(n+n+1-i)//2)-x[i]+1
  ans%=mod
  
print(ans)


Fixed submission:
mod=10**9+7
x=[0]+[0]
for i in range(1,2*10**5+10):
  x.append((x[-1]+i)%mod)

ans=0


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


for i in range(k,n+2):
  ans+=(i*(n+n+1-i)//2)-x[i]+1
  ans%=mod
  
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
if 7 in n:
  print 'Yes'
else:
  print'No'

Fixed submission:
n=input()
if '7' in n:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
n=int(input())
if n[0]==7 or n[1]==7 or n[2]==7:
  print ('Yes')
else:
  print ('No')


Fixed submission:
n=input()
if '7' in n:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
n=int(input())
if n[0]==7 or n[1]==7 or n[2]==7:
  print 'Yes'
else:
  print 'No'

Fixed submission:
n=input()
if '7' in n:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
n=int(input())
sum=0

for i in range[n+1]:
  if i%3==1 or i%3==2:
    if i%5==1 or i%5==2 or i%5==3 or i%5==4:
      sum+=i
print sum


Fixed submission:
n=int(input())
sum=0

for i in range(1,n+1):
  if i%3!=0 and i%5!=0:
    sum+=i
print(sum)

Buggy python submission (verdict: Runtime Error):
n=int(input())
sum=0

for i in range(n+1):
  if i%3==1 or i%3==2:
    if i%5==1 or i%5==2 or i%5==3 or i%5==4:
      sum+=i
print sum


Fixed submission:
n=int(input())
sum=0

for i in range(1,n+1):
  if i%3!=0 and i%5!=0:
    sum+=i
print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
n=int(input())
cnt=0
for i in range(1,n+1):
  for j in range(1,n+1):
    a=gcd(i,j)
    for k in range(1,n+1):
      cnt+=gcd(a,k)
print(cnt)


Fixed submission:
from math import gcd
k=int(input())
cnt=0
for i in range(1,k+1):
  for j in range(1,k+1):
    a=gcd(i,j)
    for k in range(1,k+1):
      cnt+=gcd(a,k)
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
k=int(input())
cnt=0
for i in range(1,k+1):
  for j in range(1,k+1):
    a=gcd(i,j)
    for k in range(1,k+1):
      cnt+=gcd(a,k)
print(cnt)

Fixed submission:
from math import gcd
k=int(input())
cnt=0
for i in range(1,k+1):
  for j in range(1,k+1):
    a=gcd(i,j)
    for k in range(1,k+1):
      cnt+=gcd(a,k)
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
import math
k=int(input())
sum=0

for a in range(1,k+1):
  for b in range(1,k+1):
    for c in range(1,k+1):
      sum+=math.gcd(math.gcd(a,b),c)

      
print(sum)


Fixed submission:
from math import gcd
k=int(input())
cnt=0
for i in range(1,k+1):
  for j in range(1,k+1):
    a=gcd(i,j)
    for k in range(1,k+1):
      cnt+=gcd(a,k)
print(cnt)

Buggy python submission (verdict: Runtime Error):
import math
k=int(input())
sum=0

for a in range(1,k+1):
  for b in range(1,k+1):
    for c in range(1,k+1):
      sum+=math.gcd(a,b,c)

      
print(sum)

Fixed submission:
from math import gcd
k=int(input())
cnt=0
for i in range(1,k+1):
  for j in range(1,k+1):
    a=gcd(i,j)
    for k in range(1,k+1):
      cnt+=gcd(a,k)
print(cnt)
Buggy python submission (verdict: Runtime Error):
import math
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
if a(n-m)<math.ceil(sum(a)//(4*m)):
  print('No')
else:
  print('Yes')


Fixed submission:
n,m=map(int,input().split())
a=list(map(int,input().split()))
count=0
for i in a:
  if i>=sum(a)/(4*m):
    count+=1
if count>=m:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input()split())

while True:
  x=n
  n=abs(n-k)
  if x==n:
    break
  
  print (n)
  


Fixed submission:
n,k=map(int,input().split())
a=n%k
b=k-a
print(min(a,b))

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input()split())

while True:
  x=n
  n=abs(n-k)
  if x==n:
    break
  
  print n
  

Fixed submission:
n,k=map(int,input().split())
a=n%k
b=k-a
print(min(a,b))
Buggy python submission (verdict: Runtime Error):
s=input()

if s[2]==s[3] and s[4]=s[5]:
  print ('Yes')

else:
  print('No')

Fixed submission:
s=input()

if s[2]==s[3] and s[4]==s[5]:
  print ('Yes')

else:
  print('No')
Buggy python submission (verdict: Runtime Error):
x=int(input())
i=x//500
a=(x-i)//5
sum=i*1000+a*5
print sum


Fixed submission:
x=int(input())
i=x//500
a=(x-i*500)//5
print(i*1000+a*5)
Buggy python submission (verdict: Runtime Error):
x,y,a,b,c=map(int,input().split())
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))

sin=p[a-x:]+q[b-y:]
sin.sort(reverse=True)

r.sort(reverse=True)

ans=sum(sin)

for i in sin:
  if r[0]>i:
    ans+=r[0]-i
    r.pop(0)
    

print(ans)

Fixed submission:
x,y,a,b,c=map(int,input().split())
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))

p.sort()
q.sort()


sin=p[a-x:]+q[b-y:]+r

sin.sort()

print(sum(sin[len(sin)-x-y:]))

Buggy python submission (verdict: Runtime Error):
x,y,a,b,c=map(int,input().split())
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))

sin=p[:-x]+q[:-y]
sin.sort(reverse=True)

r.sort(reverse=True)

ans=sum(sin)

for i in sin:
  if r[0]>i:
    ans+=r[0]-i
    r.pop(0)
    

print(ans)


Fixed submission:
x,y,a,b,c=map(int,input().split())
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))

p.sort()
q.sort()


sin=p[a-x:]+q[b-y:]+r

sin.sort()

print(sum(sin[len(sin)-x-y:]))
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
print(n/(2n-4)+m/(2m-4))

Fixed submission:
n,m=map(int,input().split())
print(((n*(n-1))+(m*(m-1)))//2)
Buggy python submission (verdict: Runtime Error):
s=input()
a=s[:len(s)//2]
b=s[(len(s)//2)+1:]
if a==b:
  if a==reversed(a) and b==reversed(b):
  print('Yes')
  else:
    print('No')
else:
  print('No')


Fixed submission:
s=input()
ans='No'
if s==s[::-1]:
  t=s[:len(s)//2]
  if t==t[::-1]:
    u=s[len(s)//2+1:]
    if u==u[::-1]:
      ans='Yes'
print(ans)

Buggy python submission (verdict: Runtime Error):
s=input()
a=s[:len(s)//2]
b=s[(len(s)//2)+1:]
if a==b:
  if a==reversed(a) and b==reversed(b):
  print('Yes')
else:
  print('No')


Fixed submission:
s=input()
ans='No'
if s==s[::-1]:
  t=s[:len(s)//2]
  if t==t[::-1]:
    u=s[len(s)//2+1:]
    if u==u[::-1]:
      ans='Yes'
print(ans)

Buggy python submission (verdict: Runtime Error):
s=input()
a=s[:len(s)//2]
b=s[(len(s)//2)+1:]
if a==a.reverse() and b==b.reverse():
  print('Yes')
else:
  print('No')


Fixed submission:
s=input()
ans='No'
if s==s[::-1]:
  t=s[:len(s)//2]
  if t==t[::-1]:
    u=s[len(s)//2+1:]
    if u==u[::-1]:
      ans='Yes'
print(ans)

Buggy python submission (verdict: Runtime Error):
s=input()
a=s[:len(s)//2]
b=s[(len(s)//2)+2:]
if a==a.reverse() and b==b.reverse():
  print('Yes')
else:
  print('No')

Fixed submission:
s=input()
ans='No'
if s==s[::-1]:
  t=s[:len(s)//2]
  if t==t[::-1]:
    u=s[len(s)//2+1:]
    if u==u[::-1]:
      ans='Yes'
print(ans)

Buggy python submission (verdict: Runtime Error):
s=input()
n=len(s)
if s[0]==s[(n-3)/2] and s[(n+1)/2]==s[n-1]:
  print ('Yes')
else:
  print('No')

Fixed submission:
s=input()
ans='No'
if s==s[::-1]:
  t=s[:len(s)//2]
  if t==t[::-1]:
    u=s[len(s)//2+1:]
    if u==u[::-1]:
      ans='Yes'
print(ans)
Buggy python submission (verdict: Runtime Error):
s=input()
if s=='AAA' or s=='BBB':
  print ('No')
else ('Yes')  


Fixed submission:
s=input()
if s=='AAA' or s=='BBB':
  print ('No')
else:
  print('Yes')

Buggy python submission (verdict: Runtime Error):
s=input()
if s='AAA' or 'BBB':
  print ('No')
else ('Yes')  

Fixed submission:
s=input()
if s=='AAA' or s=='BBB':
  print ('No')
else:
  print('Yes')
Buggy python submission (verdict: Runtime Error):
n,a,b=map(int,input().split())
x=n//(a+b)
y=n%(a+b)

if y<=a:
  print(x*b)
else:
  z=(x*b)+(y-a)
  print z


Fixed submission:
n,a,b=map(int,input().split())
x=(n//(a+b))*a
y=min(a,n%(a+b))
print(x+y)
Buggy python submission (verdict: Runtime Error):
import math
print(math.ceil(int(input()/2)))

Fixed submission:
import math
n=int(input())
print(math.ceil(n/2))

Buggy python submission (verdict: Runtime Error):
n=int(input())
if n%2==0:
  print (n/2)
else:
  a=(n//2+1)
  print a


Fixed submission:
import math
n=int(input())
print(math.ceil(n/2))
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
lst=[list(map(int,input().split())) for i in range(m)]
ans=-1
if n>=2:
  for i in range(10**(n-1),10**n):
    k=['0']+list(str(i))
    judge=True
    for j in lst:
      if k[j[0]]!=str(j[1]):
        judge=False
        break
    if judge:
      ans=i
      break

elif n==1:
  for i in range(10):
  k=['0']+list(str(i))
  judge=True
  for j in lst:
    if k[j[0]]!=str(j[1]):
      judge=False
      break
  if judge:
    ans=i
    break
print(ans)

Fixed submission:
n,m=map(int,input().split())
lst=[list(map(int,input().split())) for i in range(m)]
ans=-1
if n>=2:
  for i in range(10**(n-1),10**n):
    k=['0']+list(str(i))
    judge=True
    for j in lst:
      if k[j[0]]!=str(j[1]):
        judge=False
        break
    if judge:
      ans=i
      break

elif n==1:
  for i in range(10):
    k=['0']+list(str(i))
    judge=True
    for j in lst:
      if k[j[0]]!=str(j[1]):
        judge=False
        break
    if judge:
      ans=i
      break
print(ans)
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
sum=0
while n>=1:
  n=n/k
  sum+=1
  
print (sum)


Fixed submission:
n,r=map(int,input().split())

if n>=10:
  print(r)

else:
  print(r+(10-n)*100)
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
sum=0
while n>=1:
  n=n/k
  sum+=1
  
print sum


Fixed submission:
n,k=map(int,input().split())
count=1
while n>=k:
  n=n/k
  count+=1
print(count)

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
sum=0
while n>=1:
  n=n/k
  sum+=1
  
return sum


Fixed submission:
n,k=map(int,input().split())
count=1
while n>=k:
  n=n/k
  count+=1
print(count)

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
sum=0
while n>1:
  n=n/k
  sum+=1
  
return sum

Fixed submission:
n,k=map(int,input().split())
count=1
while n>=k:
  n=n/k
  count+=1
print(count)
Buggy python submission (verdict: Runtime Error):
n=int(input())
ans='APPROVED'
for i in range(n):
  x=int(input())
  if x%2==0:
    if x%3!=0 and x%5!=0:
      ans='DENIED'
      break
print(ans)

Fixed submission:
n=int(input())
ans='APPROVED'
a=list(map(int,input().split()))
for x in a:
  if x%2==0:
    if x%3!=0 and x%5!=0:
      ans='DENIED'
      break
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
count=0
for i in a:
  if i%2==0:
    count+=1
  if i%2==0 and i%3!=0 and i%5!=0:
    print('DENIED')
if count=0:
  print('DENIED')
else:
  print('APPROVED')

    


Fixed submission:
n=int(input())
ans='APPROVED'
a=list(map(int,input().split()))
for x in a:
  if x%2==0:
    if x%3!=0 and x%5!=0:
      ans='DENIED'
      break
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
x=[]
for i in a:
  if i%2==0:
    x+=i
for y in x:
  if x=[]:
    print('APPROVED')
  elif y%3!=0 and y%5!=0:
    print('DENIED')
  else:
    print('APPROVED')

    


Fixed submission:
n=int(input())
ans='APPROVED'
a=list(map(int,input().split()))
for x in a:
  if x%2==0:
    if x%3!=0 and x%5!=0:
      ans='DENIED'
      break
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
x=[]
for i in a:
  if i%2==0:
    x+=i
for y in x:
  if y%3!=0 and y%5!=0:
    print('DENIED')
  else:
    print('APPROVED')

    

Fixed submission:
n=int(input())
ans='APPROVED'
a=list(map(int,input().split()))
for x in a:
  if x%2==0:
    if x%3!=0 and x%5!=0:
      ans='DENIED'
      break
print(ans)
Buggy python submission (verdict: Runtime Error):
s,t=input().split()
a,b=(int,input().split())
u=input()

if s==u:
  print (a-1,b)
elif t==u:
  print(a,b-1)


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

if s==u:
  print (a-1,b)
elif t==u:
  print(a,b-1)
Buggy python submission (verdict: Runtime Error):
s=input()
print(x*len(s))

Fixed submission:
s=input()
print('x'*len(s))