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

gu = []
ans = []

for i in range(N):
    if A[i] % 2 == 0:
        gu.append(A[i])
    else:
        pass

for j in range(len(gu)):
    if gu[j] % 3 == 0 or gu[j] % 5 == 0:
        ans.append(gu[j])
    else:
        pass

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

gu = []
ans = []

for i in range(N):
    if A[i] % 2 == 0:
        gu.append(A[i])
    else:
        pass

for j in range(len(gu)):
    if gu[j] % 3 == 0 or gu[j] % 5 == 0:
        ans.append(gu[j])
    else:
        pass

if gu == ans:
    print("APPROVED")
else:
    print("DENIED")
