N=int(input())
A=list(map(int,input().split()))
a=[]
b=[]
for i in A:
    if i%2==0:
        a.append(i)
for n in a:
    if n%3==0 or n%5==0:
        b.append(n)
if len(a)==len(b):
    print('APPROVED')
else:
    print('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 a=[] a [] b=[] b [] for i in A:
    if i%2==0:
        a.append(i) i A if i%2==0:
        a.append(i) i%2==0 i%2 i 2 0 a.append(i) a.append a append i for n in a:
    if n%3==0 or n%5==0:
        b.append(n) n a if n%3==0 or n%5==0:
        b.append(n) n%3==0 or n%5==0 n%3==0 n%3 n 3 0 n%5==0 n%5 n 5 0 b.append(n) b.append b append n if len(a)==len(b):
    print('APPROVED')
else:
    print('DENIED') len(a)==len(b) len(a) len a len(b) len b print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' a=[] [] a b=[] [] b 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()))
a=[]
b=[]
for i in A:
    if i%2==0:
        a.append(i)
for n in a:
    if n%3==0 or n%5==0:
        b.append(n)
if len(a)==len(b):
    print('APPROVED')
else:
    print('DENIED')