n=int(input())
A=list(map(int,input().split()))
B=[]

for i in range(n):
    if A[i]%2==0:
        B.append(A[i])

cnt=0
for i in range(len(B)):
    if B[i]%3==0 or B[i]%5==0:
        cnt+=1
if cnt==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 B=[] B [] for i in range(n):
    if A[i]%2==0:
        B.append(A[i]) i range(n) range n if A[i]%2==0:
        B.append(A[i]) A[i]%2==0 A[i]%2 A[i] A i 2 0 B.append(A[i]) B.append B append A[i] A i cnt=0 cnt 0 for i in range(len(B)):
    if B[i]%3==0 or B[i]%5==0:
        cnt+=1 i range(len(B)) range len(B) len B if B[i]%3==0 or B[i]%5==0:
        cnt+=1 B[i]%3==0 or B[i]%5==0 B[i]%3==0 B[i]%3 B[i] B i 3 0 B[i]%5==0 B[i]%5 B[i] B i 5 0 cnt+=1 cnt 1 if cnt==len(B):
    print("APPROVED")
else:
    print("DENIED") cnt==len(B) cnt len(B) len B print("APPROVED") print "APPROVED" print("DENIED") print "DENIED" cnt=0 0 cnt n=int(input()) int(input()) n cnt+=1 1 cnt A=list(map(int,input().split())) list(map(int,input().split())) A B=[] [] B
n=int(input())
A=list(map(int,input().split()))
B=[]

for i in range(n):
    if A[i]%2==0:
        B.append(A[i])

cnt=0
for i in range(len(B)):
    if B[i]%3==0 or B[i]%5==0:
        cnt+=1
if cnt==len(B):
    print("APPROVED")
else:
    print("DENIED")