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