N=int(input())
A=list(map(int,input().split()))
i=0
for a in A:
    if a%2==0:
        if a%3==0 or a%5==0:
            i=0
        else:
            print("DENIED")
            i=1
            break

if i==0:
    print("APPROVED") 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 i=0 i 0 for a in A:
    if a%2==0:
        if a%3==0 or a%5==0:
            i=0
        else:
            print("DENIED")
            i=1
            break a A if a%2==0:
        if a%3==0 or a%5==0:
            i=0
        else:
            print("DENIED")
            i=1
            break a%2==0 a%2 a 2 0 if a%3==0 or a%5==0:
            i=0
        else:
            print("DENIED")
            i=1
            break a%3==0 or a%5==0 a%3==0 a%3 a 3 0 a%5==0 a%5 a 5 0 i=0 i 0 print("DENIED") print "DENIED" i=1 i 1 break if i==0:
    print("APPROVED") i==0 i 0 print("APPROVED") print "APPROVED" N=int(input()) int(input()) N i=0 0 i A=list(map(int,input().split())) list(map(int,input().split())) A i=0 0 i i=1 1 i
N=int(input())
A=list(map(int,input().split()))
i=0
for a in A:
    if a%2==0:
        if a%3==0 or a%5==0:
            i=0
        else:
            print("DENIED")
            i=1
            break

if i==0:
    print("APPROVED")
