n = int(input())
documents = list(map(int, input().split()))

i = 0
for document in documents:
    if document % 2 == 0:
        if not (document % 3 == 0 or document % 5 == 0):
            i = i + 1

if 1 <= i:
    print("DENIED")
else:
    print("APPROVED") n = int(input()) n int(input()) int input() input documents = list(map(int, input().split())) documents list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split i = 0 i 0 for document in documents:
    if document % 2 == 0:
        if not (document % 3 == 0 or document % 5 == 0):
            i = i + 1 document documents if document % 2 == 0:
        if not (document % 3 == 0 or document % 5 == 0):
            i = i + 1 document % 2 == 0 document % 2 document 2 0 if not (document % 3 == 0 or document % 5 == 0):
            i = i + 1 not (document % 3 == 0 or document % 5 == 0) document % 3 == 0 or document % 5 == 0 document % 3 == 0 document % 3 document 3 0 document % 5 == 0 document % 5 document 5 0 i = i + 1 i i + 1 i 1 if 1 <= i:
    print("DENIED")
else:
    print("APPROVED") 1 <= i 1 i print("DENIED") print "DENIED" print("APPROVED") print "APPROVED" n = int(input()) int(input()) n i = i + 1 i + 1 i documents = list(map(int, input().split())) list(map(int, input().split())) documents i = 0 0 i
n = int(input())
documents = list(map(int, input().split()))

i = 0
for document in documents:
    if document % 2 == 0:
        if not (document % 3 == 0 or document % 5 == 0):
            i = i + 1

if 1 <= i:
    print("DENIED")
else:
    print("APPROVED")
