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

for i in range(N):
    if A[i]%2 == 0:
        count += 1
        if A[i]%3==0 or A[i]%5==0:
            okey += 1

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

for i in range(N):
    if A[i]%2 == 0:
        count += 1
        if A[i]%3==0 or A[i]%5==0:
            okey += 1

if count==okey:
    print("APPROVED")
else:
    print("DENIED")