n = int(input())
numlist = map(int, input().split())
numarr = list(numlist)
isevenList = [i for i in numarr if i % 2 == 0]
answerList = []
for i in isevenList:
    if i % 3 == 0 or i % 5 == 0:
        answerList.append("APPROVED")
    else:
        answerList.append("DENIED")
if "DENIED" in answerList:
    print("DENIED")
else:
    print("APPROVED") n = int(input()) n int(input()) int input() input numlist = map(int, input().split()) numlist map(int, input().split()) map int input().split() ().split () input split numarr = list(numlist) numarr list(numlist) list numlist i for i in numarr if i % 2 == 0 for i in numarr if i % 2 == 0 i numarr i % 2 == 0 i % 2 i 2 0 if i % 2 == 0 i isevenList = [i for i in numarr if i % 2 == 0] isevenList [i for i in numarr if i % 2 == 0] answerList = [] answerList [] for i in isevenList:
    if i % 3 == 0 or i % 5 == 0:
        answerList.append("APPROVED")
    else:
        answerList.append("DENIED") i isevenList if i % 3 == 0 or i % 5 == 0:
        answerList.append("APPROVED")
    else:
        answerList.append("DENIED") i % 3 == 0 or i % 5 == 0 i % 3 == 0 i % 3 i 3 0 i % 5 == 0 i % 5 i 5 0 answerList.append("APPROVED") answerList.append answerList append "APPROVED" answerList.append("DENIED") answerList.append answerList append "DENIED" if "DENIED" in answerList:
    print("DENIED")
else:
    print("APPROVED") "DENIED" in answerList "DENIED" answerList print("DENIED") print "DENIED" print("APPROVED") print "APPROVED" isevenList = [i for i in numarr if i % 2 == 0] [i for i in numarr if i % 2 == 0] isevenList answerList = [] [] answerList n = int(input()) int(input()) n numlist = map(int, input().split()) map(int, input().split()) numlist numarr = list(numlist) list(numlist) numarr
n = int(input())
numlist = map(int, input().split())
numarr = list(numlist)
isevenList = [i for i in numarr if i % 2 == 0]
answerList = []
for i in isevenList:
    if i % 3 == 0 or i % 5 == 0:
        answerList.append("APPROVED")
    else:
        answerList.append("DENIED")
if "DENIED" in answerList:
    print("DENIED")
else:
    print("APPROVED")