n=int(input())
a=[int(i) for i in input().split()]
flag=0
for i in range(0,len(a)):
    if(a[i]%2==0 and (a[i]%3==0 or a[i]%5==0)):
        pass
    elif(a[i]%2==0 and (a[i]%3!=0 or a[i]%5!=0)):
        flag=1
        break
if(flag==1):
    print('DENIED')
else:
    print('APPROVED') n=int(input()) n int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i a=[int(i) for i in input().split()] a [int(i) for i in input().split()] flag=0 flag 0 for i in range(0,len(a)):
    if(a[i]%2==0 and (a[i]%3==0 or a[i]%5==0)):
        pass
    elif(a[i]%2==0 and (a[i]%3!=0 or a[i]%5!=0)):
        flag=1
        break i range(0,len(a)) range 0 len(a) len a if(a[i]%2==0 and (a[i]%3==0 or a[i]%5==0)):
        pass
    elif(a[i]%2==0 and (a[i]%3!=0 or a[i]%5!=0)):
        flag=1
        break a[i]%2==0 and (a[i]%3==0 or a[i]%5==0) a[i]%2==0 a[i]%2 a[i] a i 2 0 a[i]%3==0 or a[i]%5==0 a[i]%3==0 a[i]%3 a[i] a i 3 0 a[i]%5==0 a[i]%5 a[i] a i 5 0 elif(a[i]%2==0 and (a[i]%3!=0 or a[i]%5!=0)):
        flag=1
        break a[i]%2==0 and (a[i]%3!=0 or a[i]%5!=0) a[i]%2==0 a[i]%2 a[i] a i 2 0 a[i]%3!=0 or a[i]%5!=0 a[i]%3!=0 a[i]%3 a[i] a i 3 0 a[i]%5!=0 a[i]%5 a[i] a i 5 0 flag=1 flag 1 break if(flag==1):
    print('DENIED')
else:
    print('APPROVED') flag==1 flag 1 print('DENIED') print 'DENIED' print('APPROVED') print 'APPROVED' n=int(input()) int(input()) n flag=1 1 flag a=[int(i) for i in input().split()] [int(i) for i in input().split()] a flag=0 0 flag
n=int(input())
a=[int(i) for i in input().split()]
flag=0
for i in range(0,len(a)):
    if(a[i]%2==0 and (a[i]%3==0 or a[i]%5==0)):
        pass
    elif(a[i]%2==0 and (a[i]%3!=0 or a[i]%5!=0)):
        flag=1
        break
if(flag==1):
    print('DENIED')
else:
    print('APPROVED')