qyliang/CodeNanoFix huggingface dataset:
Buggy code:
# -*- coding: utf-8 -*-
"""
Created on Sun Feb 16 20:59:44 2020

@author: W_Indicate
"""

A, B, C = (int(x) for x in input().split())

if A == B == C:
    print("No")
else:
    print("Yes")

Fixed code:
# -*- coding: utf-8 -*-
"""
Created on Sun Feb 16 20:59:44 2020

@author: W_Indicate
"""

A, B, C = (int(x) for x in input().split())



if A == B == C:
    print("No")
elif (A != B)  and (C != B) and (A != C):
    print("No")
else:
    print("Yes")
Buggy code:
a, b, c = map(int, input().split())
if a == b and b == c:
    print('No')
else:
    print('Yes')

Fixed code:
a,b,c = map(int, input().split())
if a==b==c:
    print("No")
elif a == b:
    print("Yes")
elif a == c:
    print("Yes")
elif b == c:
    print("Yes")
else:
    print("No")
Buggy code:
A, B, C = map(int, input().split())
if A == B or B == C or C == A:
  print("Yes")
else:
  print("No")

Fixed code:
A, B, C = map(int, input().split())
if (A == B == C) or not (A == B or B == C or C == A):
  print("No")
else:
  print("Yes")
Buggy code:
t=set(map(int,input().split()))
if(len(t)==2):
    print("Yes")
else:
    print("No")
print(t)

Fixed code:
t=set(map(int,input().split()))
if(len(t)==2):
    print("Yes")
else:
    print("No")
Buggy code:
a,b,c=input().split()
 
if a==b==c:
  print("No")
elif a==b!=c:
  print("Yes")
elif a==c!=b:
  print("Yes")
elif a!=b==c:
  print("Yes")

Fixed code:
a,b,c=input().split()
 
if a==b==c:
  print("No")
elif a==b!=c:
  print("Yes")
elif a==c!=b:
  print("Yes")
elif a!=b==c:
  print("Yes")
else:
  print("No")
Buggy code:
A, B, C = map(int, input().split())

if A == B == C or A != B != C:
    print('No')
else:
    print('Yes')


Fixed code:
A,B,C = map(int,input().split())
if A==B!=C:
    print("Yes")
elif A!=B==C:
    print("Yes")
elif A==C!=B:
    print("Yes")
else:
    print("No")
Buggy code:
A,B,C = map(int,input().split())
	if A=B=C:
    print("No")
    elif A!=B!=C:
    print("No")
    else :
      print("Yes")
    

Fixed code:
A, B, C = map(int, input().split())

if A == B:
  if A == C:
    print('No')
  else:
    print('Yes')
elif A == C:
  print('Yes')
elif B == C:
  print('Yes')
else:
  print('No')
Buggy code:
A, B, C = map(int, input().split())

print("No" if A == B and B == C else "Yes")

Fixed code:
A, B, C = map(int, input().split())

if A != B and A != C and B !=C:
    print("No")
else:
    print("No" if A == B and B == C else "Yes")
Buggy code:
# -*- coding: utf-8 -*-

# Input
from sys import stdin
A, B, C = [int(x) for x in stdin.readline().rstrip().split()]

# Proccess
kawaisou = ""
k = 0

if A == B:
	if A == C:
		k += 0
	else:
		k += 1

if B == C:
	if B == A:
		k += 0
	else:
		k += 1

if k == 1:
	kawaisou = "Yes"
else:
	kawaisou = "No"

# Output							
print(kawaisou)

Fixed code:
# -*- coding: utf-8 -*-

# Input
from sys import stdin
A, B, C = [int(x) for x in stdin.readline().rstrip().split()]

# Proccess
kawaisou = ""
k = 0

if A == B:
	if A == C:
		k += 0
	else:
		k += 1

if B == C:
	if B == A:
		k += 0
	else:
		k += 1

if C == A:
	if C == B:
		k += 0
	else:
		k += 1

if k == 1:
	kawaisou = "Yes"
else:
	kawaisou = "No"

# Output							
print(kawaisou)
Buggy code:
a,b,c=map(int,input().split())
if a==b and b!=c or a!=b and b==c:
    print("Yes")
else:
    print("No")

Fixed code:
a,b,c=map(int,input().split())
s="Yes"
if a==b==c or a!=b and b!=c and c!=a:
    s="No"
print(s)
Buggy code:
a = sorted([int(x) for x in input().split(' ')])
if (a[0]==a[1]) or (a[1]==a[2]):
    print('Yes')
else:
    print('No')

Fixed code:
a = sorted([int(x) for x in input().split(' ')])
if a[0]==a[1] and a[1]==a[2]:
    print('No')
elif (a[0]==a[1]) or (a[1]==a[2]):
    print('Yes')
else:
    print('No')
Buggy code:
n=int(input())
ans="APPROVED"
for i in list(map(int,input().split())):
  if a%2==0:
    if a%3!=0 and a%5!=0:ans="DENIED"
print(ans)

Fixed code:
n = int(input())
a = list(map(int,input().split()))
ans = "APPROVED"

for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 != 0 and a[i] % 5 != 0:
            ans = "DENIED"
            
print(ans)
Buggy code:
N = int(input())
AL = list(map(int, input().split()))

s = "APPROVED"
for i in AL:
  if i%2 == 0 and i%3 != 0 and i%5 != 0:
    s = DENIED
print(s)

Fixed code:
N = int(input())
AL = list(map(int, input().split()))

s = "APPROVED"
for i in AL:
  if i%2 == 0 and i%3 != 0 and i%5 != 0:
    s = "DENIED"
print(s)
Buggy code:
n = int()
a = list(map(int,input().split()))
ans = 'APPROVED'

for i in a:
  if i % 2 == 0:
    if i % 3 != 0 or i % 5 != 0:
      ans = 'DENIED'
      break

print(ans)

Fixed code:
n=int(input())
a=list(map(int,input().split()))
ans="APPROVED"
for i in a:
  if i%2==0:
    if i%3!=0 and i%5!=0:ans="DENIED"
print(ans)
Buggy code:
N = int(input())

a = [0]*N
a = list(map(int, input().split()))
for i in range(N):
  
  if a[i]%2 == 0:
    if a[i]%3 != 0 and a[i]%5 != 0:
      print('DENIED')
      break
  if i == N-1:
    print('APPROVE')

Fixed code:
N = int(input())

a = [0]*N
a = list(map(int, input().split()))
for i in range(N):
  
  if a[i]%2 == 0:
    if a[i]%3 != 0 and a[i]%5 != 0:
      print('DENIED')
      break
  if i == N-1:
    print('APPROVED')
Buggy code:
print("APPROVED" if int(input()) == xsum([1 for e in [int(a) for a in input().split(" ")] if not(e % 2 == 0 and e % 3 != 0 and e % 5 != 0)]) else "DENIED")

Fixed code:
print("APPROVED" if int(input()) == sum([1 for e in [int(a) for a in input().split(" ")] if not(e % 2 == 0 and e % 3 != 0 and e % 5 != 0)]) else "DENIED")
Buggy code:
inputs = map(int, input.split(" "))

is_denied = False

for i in inputs:
  if i % 2 ==0:
    if i % 3 != 0 or i % 5 == 0:
      is_denied = True
      

if is_denied:
  print("DENIED")
else:
  print("APPROVED")

Fixed code:
input()
inputs = map(int, input().split(" "))

is_denied = False
for i in inputs:
  if i % 2 ==0 and ( i % 3 != 0 and i % 5 != 0):
      is_denied = True
      
if is_denied:
  print("DENIED")
else:
  print("APPROVED")
Buggy code:
n = int(input())
A = list(map(int,input().split()))
ans = "APPROVED"
for i in range(n):
  if A[i]%2 == 0:
    if A[i]%3!=0 or A[i]%5!=0:
      ans = "DENIED"
print(ans)

      
  

Fixed code:
n = int(input())
A = list(map(int,input().split()))
ans = "APPROVED"
for i in range(n):
  if A[i]%2 == 0:
    if A[i]%3!=0 and A[i]%5!=0:
      ans = "DENIED"
print(ans)
Buggy code:
n = int(input())
l = list(map(int,input().split()))
flag = False
for i in l:
  if i%2==0:
    if i%3!=0 or i%5!=0:
      flag=True
      break
if not flag:
  print('APPROVED')
else:
  print('DENIED')

Fixed code:
n = int(input())
l = list(map(int,input().split()))
flag = False
for i in l:
  if i%2==0:
    if i%3!=0 and i%5!=0:
      flag=True
      break
if not flag:
  print('APPROVED')
else:
  print('DENIED')
Buggy code:
def k(x):
  x=int(x)
  if x%2==0 and (x%3==0 or x%5==0):
	return 1
  return 1
n=int(input());l=list(map(k,input().split()))
if sum(l)==n:
  print("APPROVED")
else:
  print("DENIED")

Fixed code:
def k(x):
  x=int(x)
  if x%2==0:
    if (x%3==0 or x%5==0):
      return 1
    return 0
  return 1
n=int(input());l=list(map(k,input().split()))
if sum(l)==n:
  print("APPROVED")
else:
  print("DENIED")
Buggy code:
_=int(input())
a=list(map(int,input().split()))
bool=True
for i in a:
  if i%2==0:
    if i%3==0 or i%5==0:
      bool=False
if bool:
  print("APPROVED")
else:
  print("DENIED")

Fixed code:
_=int(input())
a=list(map(int,input().split()))
bool=True
for i in a:
    if i%2==0:
        if i%3==0 or i%5==0:
            pass
        else:
            bool=False
if bool:
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
n = int(input())
a = list(map(int, input().split()))
for x in a:
  if x % 2 == 0 and x % 3 != 0 and x % 5 != 0:
    print('DENIED')
print('APPROVED')

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

listdir = []
for i in b:
  if i % 2 == 0:
    if i % 3 == 0 or i % 5 == 0:
      listdir.append(i)

if len(listdir) >= 1:
  print("APPROVED")
else:
  print("DENIED")


Fixed code:
a = input()
b = list(map(int,input().split()))
 
listdir = []
for i in b:
  if i % 2 == 0:
    if i % 3 != 0 and i % 5 != 0:
      listdir.append(i)
 
if len(listdir) >= 1:
  print("DENIED")
else:
  print("APPROVED")
Buggy code:
n = int(input())
a = map(int,input().split())
for i in range (n):
  if a[i] %2 == 0:
    if a[i] %3 != 0 or a[i] %5 != 0:
      print("DENIED")
      exit()
print("APPROVED")

Fixed code:
n = int(input())
a = list(map(int, input().split()))
for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 != 0:
            if a[i] % 5 != 0:
                print("DENIED")
                exit()
        if a[i] % 5 != 0:
            if a[i] % 3 != 0:
                print("DENIED")
                exit()
print("APPROVED")
Buggy code:
N = int(input())
Ai = input()
Ai = Ai.split(' ')
ans = 'APPROVED'
for moji in Ai:
    if moji % 2 != 0:
        pass
    else:
        if (moji % 3 == 0) or (moji % 5 == 0):
            pass
        else:
            ans = 'DENIED'
            break
print(ans)


Fixed code:
N = int(input())
Ai = input()
Ai = Ai.split(' ')
ans = 'APPROVED'
for moji in Ai:
    moji = int(moji)
    if moji % 2 != 0:
        pass
    else:
        if (moji % 3 == 0) or (moji % 5 == 0):
            pass
        else:
            ans = 'DENIED'
            break
print(ans)
Buggy code:
len=int(input())
list = input().split(" ")
msg="DENIED"
for i in range(len):
  if int(list[i])%2==0 and (int(list[i])==6 or int(list[i]) == 10):
    msg="APPROVED"
  elif int(list[i])%3==0 or int(list[i])%5==0:
    msg="APPROVED"
  else:
    msg="DENIED"
    break
  
print(msg)

Fixed code:
len=int(input())
list = input().split(" ")
msg="DENIED"
for i in range(len):
  if int(list[i])%2==0 and (int(list[i])%3==0 or int(list[i])%5==0):
    msg="APPROVED"
  elif int(list[i])%2==0:
    msg="DENIED"
    break
  else:
    msg="APPROVED"  
print(msg)
Buggy code:
n=int(input())
a=[int(s) for s in input().split()]
b=0
for i in range(n):
  if a[i]%2==0:
    if a[i]%3!=0 or a[i]%5!=0:
      b+=1
if b==0:
  print("APPROVED")
else:
  print("DENIED")

Fixed code:
n=int(input())
a=[int(s) for s in input().split()]
b=0
for i in range(n):
  if a[i]%2==0:
    if a[i]%3!=0 and a[i]%5!=0:
      b+=1
if b==0:
  print("APPROVED")
else:
  print("DENIED")
Buggy code:
def main() :
    input()
    a = map(int, input().split())
    for i in a :
        if i%2==0 and i%3 != 0 and i%3 != 0 :
            print("DENIED")
            return
            
        
    print("APROVED")
    

if __name__ == '__main__':
    import sys;
    try:
        main(sys.argv)
    except TypeError:
        main()

Fixed code:
def main() :
    input()
    a = map(int, input().split())
    for i in a :
        if i%2==0 and i%3 != 0 and i%5 != 0 :
            print("DENIED")
            return
            
        
    print("APPROVED")
    

if __name__ == '__main__':
    import sys;
    try:
        main(sys.argv)
    except TypeError:
        main()
Buggy code:
n = int(input())
a = [int(x) for x in input().split()]
p = 0
for i in range(n):
    
    if a[i]%2 == 0 and a[i]%3 != 0:
        p += 1
    else:
        p = p
    if a[i]%2 == 0 and a[i]%5 != 0:
        p += 1
    else:
        p = p
if p > 0:
    print("DENIED")
else:
    print("APPROVED")


Fixed code:
n = int(input())
a = [int(x) for x in input().split()]
p = 0
for i in range(n):
    if a[i]%2 == 0:
        if a[i]%3 != 0 and a[i]%5 != 0:
            p += 1
if p > 0:
    print("DENIED")
else:
    print("APPROVED")
Buggy code:
n = int(input())
a = list(map(int, input().split()))
count = 0
ans = 0
for i in a:
    if i%2 == 0:
        count += 1
        if i%3 == 0 or i%5 == 0:
            ans += 1
if count == ans:
    print('APPROVED')
else:
    print('DEFINED')

Fixed code:
n = int(input())
a = list(map(int, input().split()))
count = 0
ans = 0
for i in a:
    if i%2 == 0:
        count += 1
        if i%3 == 0 or i%5 == 0:
            ans += 1
if count == ans:
    print('APPROVED')
else:
    print('DENIED')
Buggy code:
n = int(input())
a = list(map(int,input().split()))
c = 0
for i in a:
  if i % 2 == 0:
    if i % 3 != 0 and i % 5 != 0:
      c += 0
if c == 0:
  print("APPROVED")
else:
  print("DENIED")

Fixed code:
n = int(input())
a = list(map(int,input().split()))
cnt = 0
for i in a:
  if i % 2 == 0:
    if i % 3 != 0 and i % 5 != 0:
      cnt += 1
if cnt == 0:
  print("APPROVED")
else:
  print("DENIED")
Buggy code:
n = int(input())
a = list(map(int,input().split()))
c = 0
for i in a:
  if i % 2 == 0:
    if i % 3 != 0 or i % 5 != 0:
      c += 0
if c == 0:
  print("APPROVED")
else:
  print("DENIED")

Fixed code:
n = int(input())
a = list(map(int,input().split()))
c = 0
for i in a:
  if i % 2 == 0:
    if i % 3 != 0 and i % 5 != 0:
      c += 1
if c == 0:
  print("APPROVED")
else:
  print("DENIED")
Buggy code:
N = int(input())
n = list(map(int, input().split()))

for a in n:
    if a % 2 == 0:
        ans = all(a%3==0 or a%5==0)
if ans:
    print("APPROVED")
else:
    print("DENIED")


Fixed code:
N = int(input())
A = list(map(int, input().split()))

ans = all(a%3==0 or a%5==0 for a in A if a%2==0)
if ans:
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
N = int(input())
A = list(map(int, input().split()))
for a in A:
    if a%2==0:
        if a%3==0 or a%5==0:
            ans = 1
        else:
            ans = 0

if ans == 1:
    print("APPROVED")
else:
    print("DENIED")


Fixed code:
N=int(input())
A=list(map(int,input().split()))
flag=0
for a in A:
    if flag==0 and a%2==0:
        if a%3==0 or a%5==0:
            flag=0
        else:
            flag=1

if flag==0:
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
N = int(input())
A = list(map(int,input().split()))
if all(v%2==1 or v%3==0 or v%5==0):
    print("APPROVED")
else:
    print("DENIED")


Fixed code:
N = int(input())
A = list(map(int,input().split()))
if all(v%2==1 or v%3==0 or v%5==0 for v in A):
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
n = int(input())
a = list(map(int, input().split()))

for x in a:
  if x%2 == 0:
    if x%3 == 0 or x%5 == 0:
      print("APPROVED")
      break
    else:
      print("DENIED")
else:
  print("DENIED")

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

for x in a:
  if x%2 == 0:
    if x%3 and x%5 :
      print("DENIED")
      break
else:
  print("APPROVED")
Buggy code:
n = int(input())
a = [int(e) for e in input().split()]
flag = True
for i in range(0,n):
    if a[i] % 2 == 0 and (a[i] % 3 != 0 and a[i] % 5 != 0):
        flag = False
if flag:
    print("APPROVE")
else:
    print("DENIED")

Fixed code:
n = int(input())
a = [int(e) for e in input().split()]
flag = True
for i in range(0,n):
    if a[i] % 2 == 0:
        if a[i] % 3 != 0 and a[i] % 5 != 0:
            flag = False
if flag:
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
n = int(input())
a = list(map(int, input().split()))

for x in a:
  if x%2 == 0:
    if x%3 == 0 and x%5 == 0:
      print("DENIED")
      break
else:
  print("APPROVED")


Fixed code:
n=int(input())
a=list(map(int,input().split()))
x='APPROVED'
for i in a:
  if i%2==0:
    if i%3!=0 and i%5!=0:
      x='DENIED'
      break
print(x)
Buggy code:
import sys
n=int(input())
a=list(map(int,input().split()))
b=a[:]

for i in range(len(a)):
    if a[i]%2!=0:
        b.remove(a[i])

for i in b:
    if i%3!=0:
        if i%5!=0:
            print(i)
            print('DENIED')
            sys.exit()
            
print('APPROVED')

Fixed code:
import sys
n=int(input())
a=list(map(int,input().split()))
b=a[:]

for i in range(len(a)):
    if a[i]%2!=0:
        b.remove(a[i])

for i in b:
    if i%3!=0:
        if i%5!=0:
            print('DENIED')
            sys.exit()
            
print('APPROVED')
Buggy code:
def main():
    N = int(input())
    A = list(map(int, input().split()) for _ in range(N))

    for e in A:
        if e % 2 == 0 and e % 3 != 0 and e % 5 != 0:
            print("DENIED")
            exit(0)

    print("APPROVED")


if __name__ == "__main__":
    main()


Fixed code:
def main():
    N = int(input())
    A = list(map(int, input().split()))

    for e in A:
        if e % 2 == 0 and e % 3 != 0 and e % 5 != 0:
            print("DENIED")
            exit(0)

    print("APPROVED")


if __name__ == "__main__":
    main()
Buggy code:
def main():
    N = int(input())
    A = list(map(int, input().split()))

    even = []

    for e in A:
        if e % 2 == 0:
            even.append(e)

    print(even)

    for e in even:
        if e % 3 != 0 and e % 5 != 0:
            print("DENIED")
            exit(0)

    print("APPROVED")


if __name__ == "__main__":
    main()


Fixed code:
def main():
    N = int(input())
    A = list(map(int, input().split()))

    even = []

    for e in A:
        if e % 2 == 0:
            even.append(e)


    for e in even:
        if e % 3 != 0 and e % 5 != 0:
            print("DENIED")
            exit(0)

    print("APPROVED")


if __name__ == "__main__":
    main()
Buggy code:
def main():
    N = int(input())
    A = list(map(int,input().split()))
    i = 0
    while i < N:
        if A[i] % 2 == 0:
            if (A[i] % 3) != 0 and (A[i] % 5) != 0:
                break
        i += 1
    return("APPROVED")
print(main())

Fixed code:
def main():
    N = int(input())
    A = list(map(int,input().split()))
    i = 0
    while i < N:
        if A[i] % 2 == 0:
            if (A[i] % 3) != 0 and (A[i] % 5) != 0:
                return("DENIED")
                break
        i += 1
    return("APPROVED")
print(main())
Buggy code:
N = int input()
a = list(map(int,input().split()))
b = 0

for i in range(N):
  if a[i] % != 2:
    if a[i] % != 3 and a[i] % != 5:
      b = 1
      break
if b == 0:
  print("APPROVED")
else:
  print("DNIDED")

Fixed code:
N = int(input())
a = list(map(int,input().split()))
b = 0

for i in range(N):
    if a[i] % 2 == 0:
        if a[i] % 3 != 0 and a[i] % 5 != 0:
            b = 1
            break
if b == 0:
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
N = int(input())
A = list(map(int,input().split()))
ans = "APPROVED"
for i in range(len(A)):
    flag = 1
    if A[i]%2 == 0:
        if A[i]%3 != 0:
            flag = flag - 1
        if A[i]%5 != 0:
            flag = flag - 1  
        if flag < 0: 
            ans = "DENIED"
        print(flag)
print(ans)

Fixed code:
N = int(input())
A = list(map(int,input().split()))
ans = "APPROVED"
for i in range(len(A)):
    flag = 1
    if A[i]%2 == 0:
        if A[i]%3 != 0:
            flag = flag - 1
        if A[i]%5 != 0:
            flag = flag - 1  
        if flag < 0: 
            ans = "DENIED"
print(ans)
Buggy code:
a = int(input())
array = list(map(int, input().split())) 
ans = "APPROVED"
nu = 0
for i in range a:
  nu = array[i]
  if nu % 2 == 0:
    if nu % 3 == 0 or nu % 5 == 0:
      pass
    else:
      ans = "DENIED"
print(ans)

Fixed code:
a = int(input())
array = list(map(int, input().split())) 
ans = "APPROVED"
nu = 0
for i in range (a):
  nu = array[i]
  if nu % 2 == 0:
    if nu % 3 == 0 or nu % 5 == 0:
      pass
    else:
      ans = "DENIED"
print(ans)
Buggy code:
import sys
n=int(input())
nl=list(map(int, input().split(" ")))

for i in range(n):
 if nl[i]%2==0 :
　　if  nl[i]%6!=0 or nl[i]%10!=0:
          print("DENIED")
           sys.exit()
 

print("APPROVED")


Fixed code:
import sys
n=int(input())
nl=list(map(int, input().split(" ")))

for i in range(n):
 if nl[i]%2==0:
  #print(nl[i]%6,nl[i]%10)
  if nl[i]%6 !=0 and nl[i]%10!=0:
   print("DENIED")
   sys.exit()
print("APPROVED")
Buggy code:
n=int(input())
a=list(map(int,input().split()))
s=0
for i in a:
  if a%2==0:
    if a%3!=0 and a%5!=0:
      s=s+1
print('DENIED' if s>0 else 'APPROVED')

Fixed code:
n=int(input())
a=list(map(int,input().split()))
s=0
for i in a:
  if i%2==0:
    if i%3!=0 and i%5!=0:
      s=s+1
print('DENIED' if s>0 else 'APPROVED')
Buggy code:
n = int(input())
l = list(map(int, input().split()))
def test():
  for i in l:
    if i%3!=0 and i%5!=0:
      return "DENIED"
  return "APPROVED"
print(test())

Fixed code:
n = int(input())
l = list(map(int, input().split()))
def test():
  for i in l:
    if i%2 == 0 and i%3!=0 and i%5!=0:
      return "DENIED"
  return "APPROVED"
print(test())
Buggy code:
n = int(input())

a = list(map(int, input().split()))

Flag = True
for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 == 0 or a[i] % 5 == 0:
        else:
            Flag = False
            break
if Flag == True:
    print('APPROVED')
else:
    print('DENIED')

Fixed code:
n = int(input())

a = list(map(int, input().split()))

Flag = True
for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 == 0 or a[i] % 5 == 0:
            pass
        else:
            Flag = False
            break
if Flag == True:
    print('APPROVED')
else:
    print('DENIED')
Buggy code:
n = int(input())
a = list(map(int, input().split()))
for i in a:
    if i%2 == 0:
        if not i%3==0 or not i%5==0:
            print("DENIED")
            exit()
print("APPROVED")

Fixed code:
n = int(input())
a = list(map(int, input().split()))
for i in a:
    if i%2 == 0:
        if not (i%3==0 or i%5==0):
            print("DENIED")
            exit()
print("APPROVED")
Buggy code:
n= int(input())
l= list(map(int, input().split()))
ans= "APPROVED"
for i in l:
  if i%2==0:
    if i%3 != 0 or i%5 !=0:
      ans= "DENIED"
print(ans)

Fixed code:
n= int(input())
l= list(map(int, input().split()))
ans= "APPROVED"
for i in l:
  if i%2==0:
    if i%3 != 0 and i%5 !=0:
      ans= "DENIED"
print(ans)
Buggy code:
n = int(input())
A = list(map(int,input().split()))
a = 0
b = 0
for i in range(n):
    if A[i] %2 = 0:
        a +=1
        if A[i] %3= 0 or A[i]%5=0:
            b +=1
if a == b:
    print('APPROVED')
else:
    print('DENIED')

Fixed code:
n = int(input())
A = list(map(int,input().split()))
a = 0
b = 0
for i in range(n):
    if A[i] %2 == 0:
        a +=1
        if A[i] %3== 0 or A[i]%5==0:
            b +=1
if a == b:
    print('APPROVED')
else:
    print('DENIED')
Buggy code:
N=int(input())
c=list(map(int,input().split()))

for i in range(N):

    if c[i]%2==0:
        if c[i]%3==0 or c[i]%5==0:
        else:
            print("DENIED")
            exit(0)

print("APPROVED")


Fixed code:
N=int(input())
c=list(map(int,input().split()))

for i in range(N):

    if c[i]%2==0:
        if c[i]%3==0 or c[i]%5==0:
            continue

        else:
            print("DENIED")
            exit(0)

print("APPROVED")
Buggy code:
n = int(input())
a = list(map(int,input().split()))
for i in range(n):
  if a[i] % 2 == 0 and a[i] % 3 != 0 and [i] % 5 != 0:
    print("DENIED")
    exit()
print("APPROVED")

Fixed code:
n = int(input())
a = list(map(int,input().split()))
for i in range(n):
  if a[i] % 2 == 0:
    if a[i] % 3 != 0 and a[i] % 5 != 0:
      
      print('DENIED')
      exit()
print('APPROVED')
Buggy code:
N = int(input())
A = [int(s) for s in input().split()]
evenA = [i for i in A if i%2 == 0]
flg = True
for i in evenA:
  if i%3 != 0 and i%5 != 0:
    flg == False
if flg:
  print("APPROVED")
else:
  print("DENIED")

Fixed code:
N = int(input())
A = [int(s) for s in input().split()]
evenA = [i for i in A if i%2 == 0]
flg = True
for i in evenA:
  if i%3 != 0 and i%5 != 0:
    flg = False
if flg:
  print("APPROVED")
else:
  print("DENIED")
Buggy code:
x=int(input())
y=input()
z=y.split()
e=0
for i in z:
    w=int(i)%2
    if w%2 == 0:
        if w%5 == 0:
            continue
        elif w%3 ==0:
            continue
        else:
            e=1
        
if e == 1:
    print("DENIED")
else:
    print("APPROVED")

Fixed code:
x=int(input())
y=input()
z=y.split()
e=0
for i in z:
    w=int(i)
    if w%2 == 0:
        if w%5 == 0:
            continue
        elif w%3 ==0:
            continue
        else:
            e=1
        
if e == 1:
    print("DENIED")
else:
    print("APPROVED")