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

flag = True
for a_i in a:
    if a_i%2==0:
        if not (a_i%3==0 or a_i%5==0):
            flag=False

print("APPROVED" if flag else "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 flag = True flag True for a_i in a:
    if a_i%2==0:
        if not (a_i%3==0 or a_i%5==0):
            flag=False a_i a if a_i%2==0:
        if not (a_i%3==0 or a_i%5==0):
            flag=False a_i%2==0 a_i%2 a_i 2 0 if not (a_i%3==0 or a_i%5==0):
            flag=False not (a_i%3==0 or a_i%5==0) a_i%3==0 or a_i%5==0 a_i%3==0 a_i%3 a_i 3 0 a_i%5==0 a_i%5 a_i 5 0 flag=False flag False print("APPROVED" if flag else "DENIED") print "APPROVED" if flag else "DENIED" flag "APPROVED" "DENIED" flag=False False flag flag = True True flag 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()))

flag = True
for a_i in a:
    if a_i%2==0:
        if not (a_i%3==0 or a_i%5==0):
            flag=False

print("APPROVED" if flag else "DENIED")
