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

x=[]
ans=0
for i in a:
    if i%2==0 :
        x.append(i)
y=[]
for j in x:
    if j%3==0 or j%5==0:
        y.append(j)

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

x=[]
ans=0
for i in a:
    if i%2==0 :
        x.append(i)
y=[]
for j in x:
    if j%3==0 or j%5==0:
        y.append(j)

if len(x)==len(y):
    print("APPROVED")
else:
    print("DENIED")
