n=int(input())
a=list(map(int,input().split()))
count=0
total=0
for i in range(n):
    if a[i]%2==0:
        count+=1
        if a[i]%3==0 or a[i]%5==0:
            total+=1
if count==total:
    print("APPROVED")
else:
    print("DENIED") n=int(input()) n int(input()) int input() input a=list(map(int,input().split())) a list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split count=0 count 0 total=0 total 0 for i in range(n):
    if a[i]%2==0:
        count+=1
        if a[i]%3==0 or a[i]%5==0:
            total+=1 i range(n) range n if a[i]%2==0:
        count+=1
        if a[i]%3==0 or a[i]%5==0:
            total+=1 a[i]%2==0 a[i]%2 a[i] a i 2 0 count+=1 count 1 if a[i]%3==0 or a[i]%5==0:
            total+=1 a[i]%3==0 or a[i]%5==0 a[i]%3==0 a[i]%3 a[i] a i 3 0 a[i]%5==0 a[i]%5 a[i] a i 5 0 total+=1 total 1 if count==total:
    print("APPROVED")
else:
    print("DENIED") count==total count total print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" total+=1 1 total n=int(input()) int(input()) n count+=1 1 count total=0 0 total count=0 0 count a=list(map(int,input().split())) list(map(int,input().split())) a
n=int(input())
a=list(map(int,input().split()))
count=0
total=0
for i in range(n):
    if a[i]%2==0:
        count+=1
        if a[i]%3==0 or a[i]%5==0:
            total+=1
if count==total:
    print("APPROVED")
else:
    print("DENIED")