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

list2=[]
for i in list1:
    if i%2==0:
        list2.append(i)
    else:
        continue

list3=[]
for j in list2:
    if j%3==0 or j%5==0:
        list3.append(j)
    else:
        continue

x=len(list2)
y=len(list3)

if x==y:
    print('APPROVED')
else:
    print('DENIED') N=int(input()) N int(input()) int input() input list1 = list(map(int, input().split())) list1 list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split list2=[] list2 [] for i in list1:
    if i%2==0:
        list2.append(i)
    else:
        continue i list1 if i%2==0:
        list2.append(i)
    else:
        continue i%2==0 i%2 i 2 0 list2.append(i) list2.append list2 append i continue list3=[] list3 [] for j in list2:
    if j%3==0 or j%5==0:
        list3.append(j)
    else:
        continue j list2 if j%3==0 or j%5==0:
        list3.append(j)
    else:
        continue j%3==0 or j%5==0 j%3==0 j%3 j 3 0 j%5==0 j%5 j 5 0 list3.append(j) list3.append list3 append j continue x=len(list2) x len(list2) len list2 y=len(list3) y len(list3) len list3 if x==y:
    print('APPROVED')
else:
    print('DENIED') x==y x y print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' N=int(input()) int(input()) N list1 = list(map(int, input().split())) list(map(int, input().split())) list1 y=len(list3) len(list3) y list3=[] [] list3 list2=[] [] list2 x=len(list2) len(list2) x
N=int(input())
list1 = list(map(int, input().split()))

list2=[]
for i in list1:
    if i%2==0:
        list2.append(i)
    else:
        continue

list3=[]
for j in list2:
    if j%3==0 or j%5==0:
        list3.append(j)
    else:
        continue

x=len(list2)
y=len(list3)

if x==y:
    print('APPROVED')
else:
    print('DENIED')
