n=int(input())
a=list(map(int,input().split()))
b=[]
f=1
for i in a:
    if i%2==0:
        b.append(i)
for j in b:
    if not (j%3==0 or j%5==0):
        f=0
if f:
    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 b=[] b [] f=1 f 1 for i in a:
    if i%2==0:
        b.append(i) i a if i%2==0:
        b.append(i) i%2==0 i%2 i 2 0 b.append(i) b.append b append i for j in b:
    if not (j%3==0 or j%5==0):
        f=0 j b if not (j%3==0 or j%5==0):
        f=0 not (j%3==0 or j%5==0) j%3==0 or j%5==0 j%3==0 j%3 j 3 0 j%5==0 j%5 j 5 0 f=0 f 0 if f:
    print("APPROVED")
else:
    print("DENIED") f print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" a=list(map(int,input().split())) list(map(int,input().split())) a b=[] [] b f=0 0 f n=int(input()) int(input()) n f=1 1 f
n=int(input())
a=list(map(int,input().split()))
b=[]
f=1
for i in a:
    if i%2==0:
        b.append(i)
for j in b:
    if not (j%3==0 or j%5==0):
        f=0
if f:
    print("APPROVED")
else:
    print("DENIED")