n=int(input())
a=list(map(int,input().split()))

l=[]
flag=0
for aa in a:
  if aa%2==0:
    flag=1
    l.append(aa)

if flag==1:   
  for ll in l:
    if ll % 3!=0 and ll % 5!=0:
	    flag=2

if flag==0:
  print('APPROVED')
elif flag==1:
  print('APPROVED')
elif flag==2:
  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 l=[] l [] flag=0 flag 0 for aa in a:
  if aa%2==0:
    flag=1
    l.append(aa) aa a if aa%2==0:
    flag=1
    l.append(aa) aa%2==0 aa%2 aa 2 0 flag=1 flag 1 l.append(aa) l.append l append aa if flag==1:   
  for ll in l:
    if ll % 3!=0 and ll % 5!=0:
	    flag=2 flag==1 flag 1 for ll in l:
    if ll % 3!=0 and ll % 5!=0:
	    flag=2 ll l if ll % 3!=0 and ll % 5!=0:
	    flag=2 ll % 3!=0 and ll % 5!=0 ll % 3!=0 ll % 3 ll 3 0 ll % 5!=0 ll % 5 ll 5 0 flag=2 flag 2 if flag==0:
  print('APPROVED')
elif flag==1:
  print('APPROVED')
elif flag==2:
  print('DENIED') flag==0 flag 0 print('APPROVED') print 'APPROVED' elif flag==1:
  print('APPROVED') flag==1 flag 1 print('APPROVED') print 'APPROVED' elif flag==2:
  print('DENIED') flag==2 flag 2 print('DENIED') print 'DENIED' flag=0 0 flag l=[] [] l flag=2 2 flag n=int(input()) int(input()) n flag=1 1 flag a=list(map(int,input().split())) list(map(int,input().split())) a
n=int(input())
a=list(map(int,input().split()))

l=[]
flag=0
for aa in a:
  if aa%2==0:
    flag=1
    l.append(aa)

if flag==1:   
  for ll in l:
    if ll % 3!=0 and ll % 5!=0:
	    flag=2

if flag==0:
  print('APPROVED')
elif flag==1:
  print('APPROVED')
elif flag==2:
  print('DENIED')
