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

num2=[]
for i in num:
    if i%2==0:
        num2.append(i)
num3=[]        
for j in num2:
    if j%3==0 or j%5==0:
        num3.append(0)
    elif j%3!=0 or j%5!=0:
        num3.append(1)

a=sum(num3)

if a==0:
    print("APPROVED")
elif a!=0:
    print("DENIED") n=int(input()) n int(input()) int input() input num=list(map(int,input().split())) num list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split num2=[] num2 [] for i in num:
    if i%2==0:
        num2.append(i) i num if i%2==0:
        num2.append(i) i%2==0 i%2 i 2 0 num2.append(i) num2.append num2 append i num3=[] num3 [] for j in num2:
    if j%3==0 or j%5==0:
        num3.append(0)
    elif j%3!=0 or j%5!=0:
        num3.append(1) j num2 if j%3==0 or j%5==0:
        num3.append(0)
    elif j%3!=0 or j%5!=0:
        num3.append(1) j%3==0 or j%5==0 j%3==0 j%3 j 3 0 j%5==0 j%5 j 5 0 num3.append(0) num3.append num3 append 0 elif j%3!=0 or j%5!=0:
        num3.append(1) j%3!=0 or j%5!=0 j%3!=0 j%3 j 3 0 j%5!=0 j%5 j 5 0 num3.append(1) num3.append num3 append 1 a=sum(num3) a sum(num3) sum num3 if a==0:
    print("APPROVED")
elif a!=0:
    print("DENIED") a==0 a 0 print("APPROVED") print "APPROVED" elif a!=0:
    print("DENIED") a!=0 a 0 print("DENIED") print "DENIED" num=list(map(int,input().split())) list(map(int,input().split())) num n=int(input()) int(input()) n num2=[] [] num2 num3=[] [] num3 a=sum(num3) sum(num3) a
n=int(input())
num=list(map(int,input().split()))

num2=[]
for i in num:
    if i%2==0:
        num2.append(i)
num3=[]        
for j in num2:
    if j%3==0 or j%5==0:
        num3.append(0)
    elif j%3!=0 or j%5!=0:
        num3.append(1)

a=sum(num3)

if a==0:
    print("APPROVED")
elif a!=0:
    print("DENIED")
