n = int(input())
q = list(map(int,input().split()))
ans = 0
count = 0
for i in q:
    if i%2 == 0:
        alm = i
        count += 1
        if alm%3 == 0 or alm%5 == 0:
            ans += 1
if ans == count:
    print("APPROVED")
else:
    print("DENIED") n = int(input()) n int(input()) int input() input q = list(map(int,input().split())) q list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split ans = 0 ans 0 count = 0 count 0 for i in q:
    if i%2 == 0:
        alm = i
        count += 1
        if alm%3 == 0 or alm%5 == 0:
            ans += 1 i q if i%2 == 0:
        alm = i
        count += 1
        if alm%3 == 0 or alm%5 == 0:
            ans += 1 i%2 == 0 i%2 i 2 0 alm = i alm i count += 1 count 1 if alm%3 == 0 or alm%5 == 0:
            ans += 1 alm%3 == 0 or alm%5 == 0 alm%3 == 0 alm%3 alm 3 0 alm%5 == 0 alm%5 alm 5 0 ans += 1 ans 1 if ans == count:
    print("APPROVED")
else:
    print("DENIED") ans == count ans count print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" alm = i i alm ans = 0 0 ans ans += 1 1 ans count += 1 1 count q = list(map(int,input().split())) list(map(int,input().split())) q count = 0 0 count n = int(input()) int(input()) n
n = int(input())
q = list(map(int,input().split()))
ans = 0
count = 0
for i in q:
    if i%2 == 0:
        alm = i
        count += 1
        if alm%3 == 0 or alm%5 == 0:
            ans += 1
if ans == count:
    print("APPROVED")
else:
    print("DENIED")