n=int(input())
l=list(map(int,input().split()))
flag=True
li=[]
for i in range(len(l)):
  if l[i]%2==0:
    li.append(l[i])
for i in range(len(li)):
  if li[i]%3!=0 and li[i]%5!=0:
    flag=False
#print(li)
if flag==True:
  print("APPROVED")
else:
  print("DENIED")  n=int(input()) n int(input()) int input() input l=list(map(int,input().split())) l list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split flag=True flag True li=[] li [] for i in range(len(l)):
  if l[i]%2==0:
    li.append(l[i]) i range(len(l)) range len(l) len l if l[i]%2==0:
    li.append(l[i]) l[i]%2==0 l[i]%2 l[i] l i 2 0 li.append(l[i]) li.append li append l[i] l i for i in range(len(li)):
  if li[i]%3!=0 and li[i]%5!=0:
    flag=False
#print(li) i range(len(li)) range len(li) len li if li[i]%3!=0 and li[i]%5!=0:
    flag=False
#print(li) li[i]%3!=0 and li[i]%5!=0 li[i]%3!=0 li[i]%3 li[i] li i 3 0 li[i]%5!=0 li[i]%5 li[i] li i 5 0 flag=False flag False if flag==True:
  print("APPROVED")
else:
  print("DENIED")  flag==True flag True print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" l=list(map(int,input().split())) list(map(int,input().split())) l flag=True True flag li=[] [] li flag=False False flag n=int(input()) int(input()) n
n=int(input())
l=list(map(int,input().split()))
flag=True
li=[]
for i in range(len(l)):
  if l[i]%2==0:
    li.append(l[i])
for i in range(len(li)):
  if li[i]%3!=0 and li[i]%5!=0:
    flag=False
#print(li)
if flag==True:
  print("APPROVED")
else:
  print("DENIED") 