N = int(input())
A = list(map(int, input().split()))
flag = 0
List = []

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


for n in range(len(List)):
    if List[n] % 3 == 0:
        pass
    elif List[n] % 5 == 0:
        pass
    else:
        flag += 1
        break

if flag != 0:
    print("DENIED")
else:
    print("APPROVED") 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 flag = 0 flag 0 List = [] List [] for n in range(N):
    if A[n]%2 == 0:
        List.append(A[n]) n range(N) range N if A[n]%2 == 0:
        List.append(A[n]) A[n]%2 == 0 A[n]%2 A[n] A n 2 0 List.append(A[n]) List.append List append A[n] A n for n in range(len(List)):
    if List[n] % 3 == 0:
        pass
    elif List[n] % 5 == 0:
        pass
    else:
        flag += 1
        break n range(len(List)) range len(List) len List if List[n] % 3 == 0:
        pass
    elif List[n] % 5 == 0:
        pass
    else:
        flag += 1
        break List[n] % 3 == 0 List[n] % 3 List[n] List n 3 0 elif List[n] % 5 == 0:
        pass
     List[n] % 5 == 0 List[n] % 5 List[n] List n 5 0 flag += 1 flag 1 break if flag != 0:
    print("DENIED")
else:
    print("APPROVED") flag != 0 flag 0 print("DENIED") print "DENIED" print("APPROVED") print "APPROVED" flag = 0 0 flag List = [] [] List N = int(input()) int(input()) N flag += 1 1 flag A = list(map(int, input().split())) list(map(int, input().split())) A
N = int(input())
A = list(map(int, input().split()))
flag = 0
List = []

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


for n in range(len(List)):
    if List[n] % 3 == 0:
        pass
    elif List[n] % 5 == 0:
        pass
    else:
        flag += 1
        break

if flag != 0:
    print("DENIED")
else:
    print("APPROVED")