N=input()
A=input()
Alist=A.split()
counts=0
for i in Alist:
    if int(i)%2==1:
        counts=counts
    elif int(i)%3==0:
        counts=counts
    elif int(i)%5==0:
        counts=counts
    else:
        counts=counts+1
if counts>=1:
    print("DENIED")
else:
    print("APPROVED") N=input() N input() input A=input() A input() input Alist=A.split() Alist A.split() A.split A split counts=0 counts 0 for i in Alist:
    if int(i)%2==1:
        counts=counts
    elif int(i)%3==0:
        counts=counts
    elif int(i)%5==0:
        counts=counts
    else:
        counts=counts+1 i Alist if int(i)%2==1:
        counts=counts
    elif int(i)%3==0:
        counts=counts
    elif int(i)%5==0:
        counts=counts
    else:
        counts=counts+1 int(i)%2==1 int(i)%2 int(i) int i 2 1 counts=counts counts counts elif int(i)%3==0:
        counts=counts
     int(i)%3==0 int(i)%3 int(i) int i 3 0 counts=counts counts counts elif int(i)%5==0:
        counts=counts
     int(i)%5==0 int(i)%5 int(i) int i 5 0 counts=counts counts counts counts=counts+1 counts counts+1 counts 1 if counts>=1:
    print("DENIED")
else:
    print("APPROVED") counts>=1 counts 1 print("DENIED") print "DENIED" print("APPROVED") print "APPROVED" Alist=A.split() A.split() Alist N=input() input() N counts=counts counts counts A=input() input() A counts=counts counts counts counts=0 0 counts counts=counts counts counts counts=counts+1 counts+1 counts
N=input()
A=input()
Alist=A.split()
counts=0
for i in Alist:
    if int(i)%2==1:
        counts=counts
    elif int(i)%3==0:
        counts=counts
    elif int(i)%5==0:
        counts=counts
    else:
        counts=counts+1
if counts>=1:
    print("DENIED")
else:
    print("APPROVED")