n=int(input())
l=list(map(int,input().split()))
f=0
for i in l:
    if(i%2==0):
        if(i%3!=0 and i%5!=0):
            f=1
            break
if(f==1):
    print("DENIED")
else:
    print("APPROVED") n=int(input()) n int(input()) int input() input l=list(map(int,input().split())) l list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split f=0 f 0 for i in l:
    if(i%2==0):
        if(i%3!=0 and i%5!=0):
            f=1
            break i l if(i%2==0):
        if(i%3!=0 and i%5!=0):
            f=1
            break i%2==0 i%2 i 2 0 if(i%3!=0 and i%5!=0):
            f=1
            break i%3!=0 and i%5!=0 i%3!=0 i%3 i 3 0 i%5!=0 i%5 i 5 0 f=1 f 1 break if(f==1):
    print("DENIED")
else:
    print("APPROVED") f==1 f 1 print("DENIED") print "DENIED" print("APPROVED") print "APPROVED" f=0 0 f n=int(input()) int(input()) n l=list(map(int,input().split())) list(map(int,input().split())) l f=1 1 f
n=int(input())
l=list(map(int,input().split()))
f=0
for i in l:
    if(i%2==0):
        if(i%3!=0 and i%5!=0):
            f=1
            break
if(f==1):
    print("DENIED")
else:
    print("APPROVED")
