N = int(input())

A_list = list(map(int, input().split()))

for i in range(N):
    if A_list[i] % 2 == 0:
        if A_list[i] % 3 == 0 or A_list[i] % 5 == 0:
            continue
        else:
            print("DENIED")
            exit()

if i == N-1:
    print("APPROVED") N = int(input()) N int(input()) int input() input A_list = list(map(int, input().split())) A_list list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split for i in range(N):
    if A_list[i] % 2 == 0:
        if A_list[i] % 3 == 0 or A_list[i] % 5 == 0:
            continue
        else:
            print("DENIED")
            exit() i range(N) range N if A_list[i] % 2 == 0:
        if A_list[i] % 3 == 0 or A_list[i] % 5 == 0:
            continue
        else:
            print("DENIED")
            exit() A_list[i] % 2 == 0 A_list[i] % 2 A_list[i] A_list i 2 0 if A_list[i] % 3 == 0 or A_list[i] % 5 == 0:
            continue
        else:
            print("DENIED")
            exit() A_list[i] % 3 == 0 or A_list[i] % 5 == 0 A_list[i] % 3 == 0 A_list[i] % 3 A_list[i] A_list i 3 0 A_list[i] % 5 == 0 A_list[i] % 5 A_list[i] A_list i 5 0 continue print("DENIED") print "DENIED" exit() exit if i == N-1:
    print("APPROVED") i == N-1 i N-1 N 1 print("APPROVED") print "APPROVED" N = int(input()) int(input()) N A_list = list(map(int, input().split())) list(map(int, input().split())) A_list
N = int(input())

A_list = list(map(int, input().split()))

for i in range(N):
    if A_list[i] % 2 == 0:
        if A_list[i] % 3 == 0 or A_list[i] % 5 == 0:
            continue
        else:
            print("DENIED")
            exit()

if i == N-1:
    print("APPROVED")
