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