# ABC155 B - Papers, Please

N =int(input())
A = list(map(int,input().split()))

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

if all([B[j]%3==0 or B[j]%5==0  for j in range(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(len(A)):
    if A[i]%2 ==0:
        B.append(A[i]) i range(len(A)) range len(A) len A 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 if all([B[j]%3==0 or B[j]%5==0  for j in range(len(B))]):
    print('APPROVED')
else:
    print('DENIED') all([B[j]%3==0 or B[j]%5==0  for j in range(len(B))]) all [B[j]%3==0 or B[j]%5==0  for j in range(len(B))] print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' A = list(map(int,input().split())) list(map(int,input().split())) A N =int(input()) int(input()) N B=[] [] B
# ABC155 B - Papers, Please

N =int(input())
A = list(map(int,input().split()))

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

if all([B[j]%3==0 or B[j]%5==0  for j in range(len(B))]):
    print('APPROVED')
else:
    print('DENIED')
