n=int(input())

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

t=1

for i in range(n):
    if a[i]%2==0 and a[i]%3==0:
        t=1
    elif a[i]%2==0 and a[i]%5==0:
        t=1
    elif a[i]%2==1:
        t=1
    else:
        t=0
        break 

if t==1:
    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 t=1 t 1 for i in range(n):
    if a[i]%2==0 and a[i]%3==0:
        t=1
    elif a[i]%2==0 and a[i]%5==0:
        t=1
    elif a[i]%2==1:
        t=1
    else:
        t=0
        break  i range(n) range n if a[i]%2==0 and a[i]%3==0:
        t=1
    elif a[i]%2==0 and a[i]%5==0:
        t=1
    elif a[i]%2==1:
        t=1
    else:
        t=0
        break  a[i]%2==0 and a[i]%3==0 a[i]%2==0 a[i]%2 a[i] a i 2 0 a[i]%3==0 a[i]%3 a[i] a i 3 0 t=1 t 1 elif a[i]%2==0 and a[i]%5==0:
        t=1
     a[i]%2==0 and a[i]%5==0 a[i]%2==0 a[i]%2 a[i] a i 2 0 a[i]%5==0 a[i]%5 a[i] a i 5 0 t=1 t 1 elif a[i]%2==1:
        t=1
     a[i]%2==1 a[i]%2 a[i] a i 2 1 t=1 t 1 t=0 t 0 break if t==1:
    print("APPROVED")
else:
    print("DENIED") t==1 t 1 print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" t=1 1 t a=list(map(int,input().split())) list(map(int,input().split())) a t=1 1 t n=int(input()) int(input()) n t=0 0 t t=1 1 t t=1 1 t
n=int(input())

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

t=1

for i in range(n):
    if a[i]%2==0 and a[i]%3==0:
        t=1
    elif a[i]%2==0 and a[i]%5==0:
        t=1
    elif a[i]%2==1:
        t=1
    else:
        t=0
        break 

if t==1:
    print("APPROVED")
else:
    print("DENIED")
