# 155_b
N=int(input())
A=input().split()
result=''
for i in range(N):
    A[i]=int(A[i])
    if A[i]%2==0:
        if A[i]%3!=0 and A[i]%5!=0:
            result = 'DENIED'
            break
    else:
        result='APPROVED'
print(result) N=int(input()) N int(input()) int input() input A=input().split() A input().split() ().split () input split result='' result '' for i in range(N):
    A[i]=int(A[i])
    if A[i]%2==0:
        if A[i]%3!=0 and A[i]%5!=0:
            result = 'DENIED'
            break
    else:
        result='APPROVED' i range(N) range N A[i]=int(A[i]) A[i] A i int(A[i]) int A[i] A i if A[i]%2==0:
        if A[i]%3!=0 and A[i]%5!=0:
            result = 'DENIED'
            break
    else:
        result='APPROVED' A[i]%2==0 A[i]%2 A[i] A i 2 0 if A[i]%3!=0 and A[i]%5!=0:
            result = 'DENIED'
            break
     A[i]%3!=0 and A[i]%5!=0 A[i]%3!=0 A[i]%3 A[i] A i 3 0 A[i]%5!=0 A[i]%5 A[i] A i 5 0 result = 'DENIED' result 'DENIED' break result='APPROVED' result 'APPROVED' print(result) print result result = 'DENIED' 'DENIED' result N=int(input()) int(input()) N result='APPROVED' 'APPROVED' result result='' '' result A=input().split() input().split() A
# 155_b
N=int(input())
A=input().split()
result=''
for i in range(N):
    A[i]=int(A[i])
    if A[i]%2==0:
        if A[i]%3!=0 and A[i]%5!=0:
            result = 'DENIED'
            break
    else:
        result='APPROVED'
print(result)