N=int(input())
list1=[]
list2=[]
for i in map(int,input().split()):
    if i % 2 == 0:
        list1.append(i)
    if i % 2 == 0 and (i % 3 == 0 or i % 5 ==0):
        list2.append(i)
if list1 == list2:
    print('APPROVED')
else:
    print('DENIED') N=int(input()) N int(input()) int input() input list1=[] list1 [] list2=[] list2 [] for i in map(int,input().split()):
    if i % 2 == 0:
        list1.append(i)
    if i % 2 == 0 and (i % 3 == 0 or i % 5 ==0):
        list2.append(i) i map(int,input().split()) map int input().split() ().split () input split if i % 2 == 0:
        list1.append(i)
     i % 2 == 0 i % 2 i 2 0 list1.append(i) list1.append list1 append i if i % 2 == 0 and (i % 3 == 0 or i % 5 ==0):
        list2.append(i) i % 2 == 0 and (i % 3 == 0 or i % 5 ==0) i % 2 == 0 i % 2 i 2 0 i % 3 == 0 or i % 5 ==0 i % 3 == 0 i % 3 i 3 0 i % 5 ==0 i % 5 i 5 0 list2.append(i) list2.append list2 append i if list1 == list2:
    print('APPROVED')
else:
    print('DENIED') list1 == list2 list1 list2 print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' list1=[] [] list1 list2=[] [] list2 N=int(input()) int(input()) N
N=int(input())
list1=[]
list2=[]
for i in map(int,input().split()):
    if i % 2 == 0:
        list1.append(i)
    if i % 2 == 0 and (i % 3 == 0 or i % 5 ==0):
        list2.append(i)
if list1 == list2:
    print('APPROVED')
else:
    print('DENIED')