n=int(input())
I=list(map(int,input().split()))
for i in range(n):
    if (I[i]%2==0):
        if (I[i]%3!=0) and (I[i]%5!=0):
            print("DENIED")
            exit()
print("APPROVED")             n=int(input()) n int(input()) int input() input I=list(map(int,input().split())) I list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split for i in range(n):
    if (I[i]%2==0):
        if (I[i]%3!=0) and (I[i]%5!=0):
            print("DENIED")
            exit() i range(n) range n if (I[i]%2==0):
        if (I[i]%3!=0) and (I[i]%5!=0):
            print("DENIED")
            exit() I[i]%2==0 I[i]%2 I[i] I i 2 0 if (I[i]%3!=0) and (I[i]%5!=0):
            print("DENIED")
            exit() (I[i]%3!=0) and (I[i]%5!=0) I[i]%3!=0 I[i]%3 I[i] I i 3 0 I[i]%5!=0 I[i]%5 I[i] I i 5 0 print("DENIED") print "DENIED" exit() exit print("APPROVED") print "APPROVED" I=list(map(int,input().split())) list(map(int,input().split())) I n=int(input()) int(input()) n
n=int(input())
I=list(map(int,input().split()))
for i in range(n):
    if (I[i]%2==0):
        if (I[i]%3!=0) and (I[i]%5!=0):
            print("DENIED")
            exit()
print("APPROVED")            
