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