n=int(input())
list=[[0]*n]
list=input().split()
g=0
c=0
for i in range(n):
  list[i]=int(list[i])
  if list[i]%2==0:
    g+=1
    if list[i]%3==0 or list[i]%5==0:
      c+=1
if g==c:
  print("APPROVED")
else:
  print("DENIED")
   n=int(input()) n int(input()) int input() input list=[[0]*n] list [[0]*n] [0]*n [0] 0 n list=input().split() list input().split() ().split () input split g=0 g 0 c=0 c 0 for i in range(n):
  list[i]=int(list[i])
  if list[i]%2==0:
    g+=1
    if list[i]%3==0 or list[i]%5==0:
      c+=1 i range(n) range n list[i]=int(list[i]) list[i] list i int(list[i]) int list[i] list i if list[i]%2==0:
    g+=1
    if list[i]%3==0 or list[i]%5==0:
      c+=1 list[i]%2==0 list[i]%2 list[i] list i 2 0 g+=1 g 1 if list[i]%3==0 or list[i]%5==0:
      c+=1 list[i]%3==0 or list[i]%5==0 list[i]%3==0 list[i]%3 list[i] list i 3 0 list[i]%5==0 list[i]%5 list[i] list i 5 0 c+=1 c 1 if g==c:
  print("APPROVED")
else:
  print("DENIED")
   g==c g c print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" g+=1 1 g n=int(input()) int(input()) n g=0 0 g c=0 0 c list=[[0]*n] [[0]*n] list list=input().split() input().split() list c+=1 1 c
n=int(input())
list=[[0]*n]
list=input().split()
g=0
c=0
for i in range(n):
  list[i]=int(list[i])
  if list[i]%2==0:
    g+=1
    if list[i]%3==0 or list[i]%5==0:
      c+=1
if g==c:
  print("APPROVED")
else:
  print("DENIED")
  
